在python 3上通过pip安装scipy库时出错:“编译失败,错误代码为1”

2024-04-19 12:54:06 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图通过pip在python 3.3.5上安装scipy库。在脚本结束时,我得到了这个错误:

Command /usr/local/opt/python3/bin/python3.3 -c "import setuptools, tokenize;file='/private/tmp/pip_build_root/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-9r7808-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/scipy Storing debug log for failure in /Users/dan/.pip/pip.log


Tags: installpipinbuildlogrootscipyopen
3条回答

我在使用pip时得到了同样的结果,我去安装它,它指出了以下依赖项。

sudo apt-get install python python-dev libatlas-base-dev gcc gfortran g++

我从https://github.com/scipy/scipy下载了源代码,并能够使用python 3成功地构建和安装它。

$ python3 -m pip install --upgrade pip
$ python3 -m pip install scipy

为我工作!有同样的问题!

相关问题 更多 >