pip 另一种安装方法:python setup.py install
Posted UQI-LIUWJ
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了pip 另一种安装方法:python setup.py install相关的知识,希望对你有一定的参考价值。
最近在安装prophet,使用'pip install prophet‘ 怎么安装都不对(报错信息附在最后【Requirement already satisfied和warning部分略去了】,如果有大神能指教一下,感激不尽~)
1 另一种安装方法
先从prophet/python at main · facebook/prophet (github.com)中下载代码(将网址复制到GitZip (kinolien.github.io)
然后在对应的路径上执行python setup.py install 即可
检验结果
pip 报错信息
pip install prophet
Collecting prophet
Using cached prophet-1.0.1.tar.gz (65 kB)
Preparing metadata (setup.py) ... done
......
c:\\users\\16000\\appdata\\local\\programs\\python\\python37\\lib\\site-packages (from python-dateutil>=2.8.0->prophet) (1.15.0)
Building wheels for collected packages: prophet
Building wheel for prophet (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [1054 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\\lib
creating build\\lib\\prophet
creating build\\lib\\prophet\\stan_model
.....
C:\\Users\\16000\\AppData\\Local\\Temp\\tmpyl7kw1p2\\stanfit4anon_model_f5236004a3fd5b8429270d00efcc0cf9_7855577885934722650.cp37-win_amd64.pyd : fatal error LNK1120: 4 unresolved externals
error: command 'C:\\\\Program Files (x86)\\\\Microsoft Visual Studio 14.0\\\\VC\\\\BIN\\\\x86_amd64\\\\link.exe' failed with exit status 1120
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for prophet
Running setup.py clean for prophet
Failed to build prophet
Installing collected packages: pystan, prophet
Attempting uninstall: pystan
Found existing installation: pystan 2.18.0.0
Uninstalling pystan-2.18.0.0:
Successfully uninstalled pystan-2.18.0.0
Running setup.py install for prophet ... error
error: subprocess-exited-with-error
× Running setup.py install for prophet did not run successfully.
│ exit code: 1
╰─> [124 lines of output]
running install
running build
running build_py
creating build
creating build\\lib
creating build\\lib\\prophet
creating build\\lib\\prophet\\stan_model
....
Internal Compiler Error in C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe. You will be prompted to send an error report to Microsoft later.
error: command 'C:\\\\Program Files (x86)\\\\Microsoft Visual Studio 14.0\\\\VC\\\\BIN\\\\x86_amd64\\\\cl.exe' failed with exit status 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> prophet
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
以上是关于pip 另一种安装方法:python setup.py install的主要内容,如果未能解决你的问题,请参考以下文章
CentOS5.5上安装Python2.7及ez_setup和pip包
“python setup.py install”和“pip install”之间的区别