一、环境
macOS Catalina10.15正式版
xcode11.1
二、安装fbprophet
(env_jia) Arithmetic@qingjiaowosuanshujiadeMacBook-Pro this_jia % pip install fbprophet
Building wheels for collected packages: fbprophet
Running setup.py bdist_wheel for fbprophet ... error
Complete output from command /Applications/anaconda3/envs/env_jia/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/3h/zngf4vjs0m30_30ldfq3t3wr0000gn/T/pip-install-e2w0zzp1/fbprophet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/3h/zngf4vjs0m30_30ldfq3t3wr0000gn/T/pip-wheel-14_q19n5 --python-tag cp35:
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/fbprophet
creating build/lib/fbprophet/stan_model
INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_861b75c6337e237650a61ae58c4385ef NOW.
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
Failed building wheel for fbprophet
Running setup.py clean for fbprophet
Failed to build fbprophet
Installing collected packages: fbprophet
Running setup.py install for fbprophet ... error
Complete output from command /Applications/anaconda3/envs/env_jia/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/3h/zngf4vjs0m30_30ldfq3t3wr0000gn/T/pip-install-e2w0zzp1/fbprophet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/3h/zngf4vjs0m30_30ldfq3t3wr0000gn/T/pip-record-bk0kgsjm/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/fbprophet
creating build/lib/fbprophet/stan_model
INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_861b75c6337e237650a61ae58c4385ef NOW.
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
Command "/Applications/anaconda3/envs/env_jia/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/3h/zngf4vjs0m30_30ldfq3t3wr0000gn/T/pip-install-e2w0zzp1/fbprophet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/3h/zngf4vjs0m30_30ldfq3t3wr0000gn/T/pip-record-bk0kgsjm/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/3h/zngf4vjs0m30_30ldfq3t3wr0000gn/T/pip-install-e2w0zzp1/fbprophet/
然后就报错,网上百度说和xcode有关,正好我的xcode暂时无法更新到最新版,每次都失败,一狠心卸载重装,7个多G啊,千辛万苦,装好了最新版的xcode,然后还是不行。
三、解决方法
先安装pystan
(env_jia) Arithmetic@qingjiaowosuanshujiadeMacBook-Pro this_jia % conda install pystan
(env_jia) Arithmetic@qingjiaowosuanshujiadeMacBook-Pro this_jia % conda install pystan
Collecting package metadata (repodata.json): done
Solving environment: /
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/osx-64::jupyter_console==5.2.0=py35hd2aa692_1
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/osx-64::ipython==6.5.0=py35_0
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/osx-64::jupyter==1.0.0=py35_7
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/osx-64::nbformat==4.4.0=py35h41c2038_0
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch::nbconvert==5.5.0=py_0
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/osx-64::notebook==5.6.0=py35_0
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/osx-64::ipykernel==4.10.0=py35_0
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/osx-64::ipywidgets==7.4.1=py35_0
- pytorch/osx-64::torchvision==0.4.1=py35_cpu
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/osx-64::prompt_toolkit==1.0.15=py35h93950c5_0
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch::jupyter_core==4.5.0=py_0
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch::jupyter_client==5.3.3=py_0
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/osx-64::bleach==2.1.4=py35_0
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch::qtconsole==4.5.5=py_0
- pytorch/osx-64::pytorch==1.3.0=py3.5_0 done
## Package Plan ##
environment location: /Applications/anaconda3/envs/env_jia
added / updated specs:
- pystan
The following packages will be downloaded:
package | build
---------------------------|-----------------
cctools-895 | 1 1.9 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
clang-4.0.1 | 1 73.9 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
clang_osx-64-4.0.1 | h1ce6c1d_18 147 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
clangxx-4.0.1 | 1 263 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
clangxx_osx-64-4.0.1 | h22b1bf0_18 147 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
compiler-rt-4.0.1 | hcfea43d_1 1.2 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
cython-0.28.5 | py35h0a44026_0 2.9 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
ld64-274.2 | 1 2.9 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
llvm-4.0.1 | 1 136.6 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
llvm-lto-tapi-4.0.1 | 1 11.9 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
pystan-2.18.0.0 | py35h6440ff4_0 18.2 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
------------------------------------------------------------
Total: 250.0 MB
The following NEW packages will be INSTALLED:
cctools anaconda/pkgs/main/osx-64::cctools-895-1
cffi anaconda/pkgs/main/osx-64::cffi-1.11.5-py35h6174b99_1
clang anaconda/pkgs/main/osx-64::clang-4.0.1-1
clang_osx-64 anaconda/pkgs/main/osx-64::clang_osx-64-4.0.1-h1ce6c1d_18
clangxx anaconda/pkgs/main/osx-64::clangxx-4.0.1-1
clangxx_osx-64 anaconda/pkgs/main/osx-64::clangxx_osx-64-4.0.1-h22b1bf0_18
compiler-rt anaconda/pkgs/main/osx-64::compiler-rt-4.0.1-hcfea43d_1
cycler anaconda/pkgs/main/osx-64::cycler-0.10.0-py35hb89929e_0
cython anaconda/pkgs/main/osx-64::cython-0.28.5-py35h0a44026_0
html5lib anaconda/pkgs/main/osx-64::html5lib-1.0.1-py35_0
jinja2 anaconda/pkgs/main/noarch::jinja2-2.10.3-py_0
kiwisolver anaconda/pkgs/main/osx-64::kiwisolver-1.0.1-py35h219a9d8_0
ld64 anaconda/pkgs/main/osx-64::ld64-274.2-1
llvm anaconda/pkgs/main/osx-64::llvm-4.0.1-1
llvm-lto-tapi anaconda/pkgs/main/osx-64::llvm-lto-tapi-4.0.1-1
matplotlib anaconda/pkgs/main/osx-64::matplotlib-3.0.0-py35h54f8f79_0
mistune anaconda/pkgs/main/osx-64::mistune-0.8.3-py35h1de35cc_1
olefile anaconda/pkgs/main/osx-64::olefile-0.46-py35_0
pandocfilters anaconda/pkgs/main/osx-64::pandocfilters-1.4.2-py35_1
pillow anaconda/pkgs/main/osx-64::pillow-5.2.0-py35hb68e598_0
prometheus_client anaconda/pkgs/main/noarch::prometheus_client-0.7.1-py_0
pycparser anaconda/pkgs/main/osx-64::pycparser-2.19-py35_0
pygments anaconda/pkgs/main/noarch::pygments-2.4.2-py_0
pyparsing anaconda/pkgs/main/noarch::pyparsing-2.4.2-py_0
pystan anaconda/pkgs/main/osx-64::pystan-2.18.0.0-py35h6440ff4_0
pytz anaconda/pkgs/main/noarch::pytz-2019.3-py_0
pyzmq anaconda/pkgs/main/osx-64::pyzmq-17.1.2-py35h1de35cc_0
traitlets anaconda/pkgs/main/osx-64::traitlets-4.3.2-py35hd3d1486_0
wcwidth anaconda/pkgs/main/osx-64::wcwidth-0.1.7-py35hdd0c235_0
widgetsnbextension anaconda/pkgs/main/osx-64::widgetsnbextension-3.4.1-py35_0
Proceed ([y]/n)? y
Downloading and Extracting Packages
clangxx-4.0.1 | 263 KB | ############################################################################################################################################### | 100%
cctools-895 | 1.9 MB | ############################################################################################################################################### | 100%
clangxx_osx-64-4.0.1 | 147 KB | ############################################################################################################################################### | 100%
clang_osx-64-4.0.1 | 147 KB | ############################################################################################################################################### | 100%
ld64-274.2 | 2.9 MB | ############################################################################################################################################### | 100%
llvm-4.0.1 | 136.6 MB | ############################################################################################################################################### | 100%
pystan-2.18.0.0 | 18.2 MB | ############################################################################################################################################### | 100%
llvm-lto-tapi-4.0.1 | 11.9 MB | ############################################################################################################################################### | 100%
clang-4.0.1 | 73.9 MB | ############################################################################################################################################### | 100%
compiler-rt-4.0.1 | 1.2 MB | ############################################################################################################################################### | 100%
cython-0.28.5 | 2.9 MB | ############################################################################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
然后安装fbprophet
(env_jia) Arithmetic@x86_64-apple-darwin13 this_jia % pip install fbprophet
(env_jia) Arithmetic@x86_64-apple-darwin13 this_jia % pip install fbprophet
Collecting fbprophet
Using cached https://files.pythonhosted.org/packages/33/fb/ad98d46773929079657706e6b2b6e366ba6c282bc2397d8f9b0ea8e5614c/fbprophet-0.5.tar.gz
Requirement already satisfied: Cython>=0.22 in /Applications/anaconda3/envs/env_jia/lib/python3.5/site-packages (from fbprophet) (0.29.13)
Requirement already satisfied: pystan>=2.14 in /Applications/anaconda3/envs/env_jia/lib/python3.5/site-packages (from fbprophet) (2.19.0.0)
Requirement already satisfied: numpy>=1.10.0 in /Applications/anaconda3/envs/env_jia/lib/python3.5/site-packages (from fbprophet) (1.17.2)
Requirement already satisfied: pandas>=0.23.4 in /Applications/anaconda3/envs/env_jia/lib/python3.5/site-packages (from fbprophet) (0.25.1)
Requirement already satisfied: matplotlib>=2.0.0 in /Applications/anaconda3/envs/env_jia/lib/python3.5/site-packages (from fbprophet) (3.0.3)
Requirement already satisfied: lunardate>=0.1.5 in /Applications/anaconda3/envs/env_jia/lib/python3.5/site-packages (from fbprophet) (0.2.0)
Requirement already satisfied: convertdate>=2.1.2 in /Applications/anaconda3/envs/env_jia/lib/python3.5/site-packages (from fbprophet) (2.1.3)
Requirement already satisfied: holidays>=0.9.5 in /Applications/anaconda3/envs/env_jia/lib/python3.5/site-packages (from fbprophet) (0.9.11)
Requirement already satisfied: setuptools-git>=1.2 in /Applications/anaconda3/envs/env_jia/lib/python3.5/site-packages (from fbprophet) (1.2)
Requirement already satisfied: python-dateutil>=2.6.1 in /Applications/anaconda3/envs/env_jia/lib/python3.5/site-packages (from pandas>=0.23.4->fbprophet) (2.7.3)
Requirement already satisfied: pytz>=2017.2 in /Applications/anaconda3/envs/env_jia/lib/python3.5/site-packages (from pandas>=0.23.4->fbprophet) (2019.3)
Requirement already satisfied: cycler>=0.10 in /Applications/anaconda3/envs/env_jia/lib/python3.5/site-packages (from matplotlib>=2.0.0->fbprophet) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /Applications/anaconda3/envs/env_jia/lib/python3.5/site-packages (from matplotlib>=2.0.0->fbprophet) (2.4.2)
Requirement already satisfied: kiwisolver>=1.0.1 in /Applications/anaconda3/envs/env_jia/lib/python3.5/site-packages (from matplotlib>=2.0.0->fbprophet) (1.1.0)
Requirement already satisfied: ephem<3.8,>=3.7.5.3 in /Applications/anaconda3/envs/env_jia/lib/python3.5/site-packages (from convertdate>=2.1.2->fbprophet) (3.7.7.0)
Requirement already satisfied: six in /Applications/anaconda3/envs/env_jia/lib/python3.5/site-packages (from holidays>=0.9.5->fbprophet) (1.12.0)
Requirement already satisfied: setuptools in /Applications/anaconda3/envs/env_jia/lib/python3.5/site-packages (from kiwisolver>=1.0.1->matplotlib>=2.0.0->fbprophet) (41.4.0)
Building wheels for collected packages: fbprophet
Running setup.py bdist_wheel for fbprophet ... done
Stored in directory: /Users/Arithmetic/Library/Caches/pip/wheels/16/61/45/2dce71b1055b65f28a8b75702664adee6c645e3e294178a202
Successfully built fbprophet
Installing collected packages: fbprophet
Successfully installed fbprophet-0.5