Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"failed with error code 1" while installing scipy

Tags:

python

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)
like image 883
Rodolphe LAMPE Avatar asked Jun 18 '15 15:06

Rodolphe LAMPE


3 Answers

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.

like image 27
Hack-R Avatar answered Nov 11 '22 15:11

Hack-R


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

like image 123
Zahra Avatar answered Nov 11 '22 13:11

Zahra


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.

enter image description here

like image 23
Tharindu Kumara Avatar answered Nov 11 '22 15:11

Tharindu Kumara