简体   繁体   中英

“failed with error code 1” while installing scipy

I have Python 2.7.9 on windows 7 64-bits. I'm trying to install scipy using pip. I used pip install scipy but I get the following error :

Command "C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\us
ers\\admin\\appdata\\local\\temp\\pip-build-xpl5cw\\scipy\\setup.py';exec(compil
e(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file
__, 'exec'))" install --record c:\users\admin\appdata\local\temp\pip-b68pfc-reco
rd\install-record.txt --single-version-externally-managed --compile" failed with
 error code 1 in c:\users\admin\appdata\local\temp\pip-build-xpl5cw\scipy

I searched on google and stackoverflow for solutions but nothing worked. I tried upgrading pip and it didn't work too.

Here are my installed packages and their versions :

httplib2 (0.9.1)
nltk (3.0.3)
nose (1.3.7)
numpy (1.9.2)
pip (7.0.3)
pytz (2015.4)
scikit-learn (0.16.1)
setuptools (17.1.1)
six (1.9.0)
twilio (4.4.0)
wheel (0.24.0)

I'm on Ubuntu 14.04. I tried installing through pip which kept on failing with error code 1 or took forever to finish (never finished actually!). However, the following command worked without a hitch:

sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose

Reference: http://www.scipy.org/install.html

On Windows, you'll need to use the unofficial precompiled binaries:

http://www.lfd.uci.edu/~gohlke/pythonlibs/

Select the version matching your architecture and Python version.

I also had the same error when installing scipy .

Then I downloaded and installed MiniConda . And then I used the below command to install pytables.

conda install -c conda-forge scipy

Please refer the below screenshot.

在此处输入图片说明

安装setuptools对我有用(Mac OS)

pip install -U pip setuptools

在 Windows 上,您可以检查以下命令:

python -m pip install psycopg2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM