我刚刚下载了新的python 3.8
我正在尝试安装scipy
使用以下内容进行封装:
pip3.8 install scipy
但是构建失败并出现以下错误:
**Failed to build scipy**
**ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly**
我怎样才能安装这个使用pip
?我尝试使用--no-binary
版本:
pip3.8 install --no-binary :all: scipy
但最终出现了一个更可怕的错误:
**ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/8p/01_5ykld02v61rtjl8k_8j200000gp/T/pip-install-wlnk_0jg/scipy/setup.py'"'"'; __file__='"'"'/private/var/folders/8p/01_5ykld02v61rtjl8k_8j200000gp/T/pip-install-wlnk_0jg/scipy/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/8p/01_5ykld02v61rtjl8k_8j200000gp/T/pip-record-01j_ddt8/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.**
我想我遇到了和你一样的问题。错误代码是否有此信息
error: library dfftpack has Fortran sources but no Fortran compiler found
?
因为对我来说,这听起来像是 Fortran 编译器错误,而不是 python 本身的错误。我认为发生的情况是,轮子需要某种 Fortran 编译器,当安装找不到编译器时,它只会终止构建。这是我找到的解决方案:
Linux
sudo apt install gfortran
视窗 / 苹果电脑
从这里下载:https://gcc.gnu.org/wiki/GFortran#download https://gcc.gnu.org/wiki/GFortran#download
这个解决方案为我解决了这个问题。查看:在Mac OS X上brew install gcc后仍然无法安装scipy,因为缺少fortran编译器 https://stackoverflow.com/questions/29586487/still-cant-install-scipy-due-to-missing-fortran-compiler-after-brew-install-gcc更多细节。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)