windows10安装Prophet
程序员文章站
2022-05-29 11:34:47
...
- 安装MingW-w64,从官网下载安装
MingW-w64必须安装,不然会报错
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++
2.配置distutils.cfg
在PYTHONPATH\Lib\distutils文件夹下新建文件distutils.cfg,并添加下面几行:
[build]
compiler=mingw32
注意:mingw32不能改成mingw64,即使你安装的是64位的mingw64
3.安装PyStan
pip install PyStan
A:/SoftWare/mingw-w64/x86_64-6.4.0-posix-seh-rt_v5-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/6.4.0/include/c++/cmath:1157:11: error: '::hypot' has not been declared
using ::hypot;
^~~~~
error: Command "gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypes -DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSION__=0x1900 -I"a:\program files\python36\include" -I"a:\program files\python36\include" -c pystan/_misc.cpp -o build\temp.win-amd64-3.6\Release\pystan\_misc.o" failed with exit status 1
----------------------------------------
Command ""a:\program files\python36\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\mbshq\\AppData\\Local\\Temp\\pip-install-1kxvffea\\pystan\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\mbshq\AppData\Local\Temp\pip-record-oyqcqiqm\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\mbshq\AppData\Local\Temp\pip-install-1kxvffea\pystan\
如果报上面的错,在错误提示中错误的那一行前面加
#define hypot _hypot
或者将错误提示中的hypot改为_hypot
using ::_hypot;
上一篇: mysql客户端pymysql在python下性能比较
下一篇: python MySQL的API