Reputation: 18093
When installing scipy through pip with :
pip install scipy
Pip fails to build scipy and throws the following error:
Cleaning up...
Command /Users/administrator/dev/KaggleAux/env/bin/python2.7 -c "import setuptools, tokenize;__file__='/Users/administrator/dev/KaggleAux/env/build/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/zl/7698ng4d4nxd49q1845jd9340000gn/T/pip-eO8gua-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/administrator/dev/KaggleAux/env/bin/../include/site/python2.7 failed with error code 1 in /Users/administrator/dev/KaggleAux/env/build/scipy
Storing debug log for failure in /Users/administrator/.pip/pip.log
How can I get scipy to build successfully? This may be a new issue with OSX Yosemite since I just upgraded and haven't had issues installing scipy before.
Debug log:
Cleaning up...
Removing temporary dir /Users/administrator/dev/KaggleAux/env/build...
Command /Users/administrator/dev/KaggleAux/env/bin/python2.7 -c "import setuptools, tokenize;__file__='/Users/administrator/dev/KaggleAux/env/build/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/zl/7698ng4d4nxd49q1845jd9340000gn/T/pip-eO8gua-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/administrator/dev/KaggleAux/env/bin/../include/site/python2.7 failed with error code 1 in /Users/administrator/dev/KaggleAux/env/build/scipy
Exception information:
Traceback (most recent call last):
File "/Users/administrator/dev/KaggleAux/env/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/Users/administrator/dev/KaggleAux/env/lib/python2.7/site-packages/pip/commands/install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/Users/administrator/dev/KaggleAux/env/lib/python2.7/site-packages/pip/req.py", line 1435, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "/Users/administrator/dev/KaggleAux/env/lib/python2.7/site-packages/pip/req.py", line 706, in install
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
File "/Users/administrator/dev/KaggleAux/env/lib/python2.7/site-packages/pip/util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command /Users/administrator/dev/KaggleAux/env/bin/python2.7 -c "import setuptools, tokenize;__file__='/Users/administrator/dev/KaggleAux/env/build/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/zl/7698ng4d4nxd49q1845jd9340000gn/T/pip-eO8gua-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/administrator/dev/KaggleAux/env/bin/../include/site/python2.7 failed with error code 1 in /Users/administrator/dev/KaggleAux/env/build/scipy
Upvotes: 137
Views: 305398
Reputation: 2449
You can test this answer:
python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose
Upvotes: 0
Reputation: 1212
I experienced similar issues with Python 3.7 (3.7.0b4). This was due to some changes regarding some encoding assumptions (Python 3.6 >> Python 3.7)
As a result lots of package installations (e.g. via pip) failed.
Upvotes: 1
Reputation: 3579
Microsoft Windows users of 64 bit Python installations will need to download the 64 bit .whl
of Scipy from here, then simply cd
into the folder you've downloaded the .whl
file and run:
pip install scipy-0.16.1-cp27-none-win_amd64.whl
Upvotes: 92
Reputation: 31
the best method I could suggest is this
Download the wheel file from this location for your version of python
Move the file to your Main Drive eg C:>
Run Cmd and enter the following
Please note this is the version I am using for my pyhton 3.6.2 it should install fine
you may want to run this command after to make sure all your python add ons are up to date
pip list --outdated
Upvotes: 3
Reputation: 2229
In windows 10, most options will not work. Follow these steps:
In Windows 10 with CMD, you cannot download
scipy
directly using most of the well known commands likewget
,cloning scipy github
,pip install scipy
, etcTo install, go to pythonlibs .whl files , and if you are using
python 2.7 32 bit
then downloadnumpy-1.11.2rc1+mkl-cp27-cp27m-win32.whl and scipy-0.18.1-cp27-cp27m-win32.whl
or ifpython 2.7 62 bit
then downloadnumpy-1.11.2rc1+mkl-cp27-cp27m-win_amd64.whl and scipy-0.18.1-cp27-cp27m-win_amd64.whl
After downloading,save the files under your
python directory
, in my case it wasc:\>python27
Then run:
pip install C:\Python27\numpy-1.11.2rc1+mkl-cp27-cp27m-win32.whl
pip install C:\Python27\scipy-0.18.1-cp27-cp27m-win32.whl
Note:
scipy
needs numpy
as dependency, so that's why we are downloading numpy
before scipy
.cp27
in .whl files means that these files are meant for python 2.7
and cp33
stands for python 3.x
speciafically >=3.3Upvotes: 41
Reputation: 147
For windows(7 in my case):
create one some.bat file with content
@echo off
C:\Python36\python.exe -m pip -V
C:\Python36\python.exe -m pip install scipy-0.19.1-cp36-cp36m-win32.whl
C:\Python36\python.exe -m pip list
pause
then run this batch file some.bat
import scipy
Upvotes: 0
Reputation: 1
The easiest way is in the following steps: Fixing scipy for python [ 2.n < python < 3.n ]
Download the necessary files from: http://www.lfd.uci.edu/~gohlke/pythonlibs/
Download the version of numpy+mkl (needed to run scipy) and then download scipy for your python type (2.n python written as 2n) or (3.n python written as 3n), n is a variable. Note you must know whether you have a 32bit or 64bit processor.
Create a directory somewhere on your computer, example [C:\DIRECTORY] to install the files numpy+mkd.whl and scipy.whl
Once both file are downloaded, find the location of the file on your computer and move it to the directory you created.
Example: First file installation is needed for scipy is in
C:\DIRECTORY\numpy\numpy-0.0.0+mkl-cp2n-cp2nm-win_amd32.whl
Example: Second file installation is in
C:\DIRECTORY\scipy\scipy-0.0.0-cp2n-cp2nm-win_amd32.whl
Go to your command prompt and proceed the following example for a python version 2.n:
py -2.n -m pip install C:\DIRECTORY\numpy\numpy-0.0.0+mkl-cp2n-cp2nm-win_amd32.whl
should install
py -2.n -m pip install C:\DIRECTORY\scipy\scipy-0.0.0-cp2n-cp2nm-win_amd32.whl
should install
Test both modules on your python IDLE as following:
import numpy
import scipy
the modules are working if no errors are returned.
IFDAAS
Upvotes: 0
Reputation: 253
I was having the same issue, and I had succeeded using sudo
.
$ sudo pip install scipy
Upvotes: 0
Reputation: 525
use the wheel file to install download from here http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy install
pip install c:\jjjj\ggg\fdadf.whl
Upvotes: 0
Reputation: 91
For Windows 10
Download whl file for the apropriate python version from http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
put it under directory run the below command
C:\directory> pip install scipy-0.19.0rc2-cp35-cp35m-win_amd64.whl
Upvotes: 9
Reputation: 436
Rather than going the harder route of downloading specific packages. I prefer to go the faster route of using Conda. pip has its issues.
Conda , install conda from : https://conda.io/docs/install/quick.html#windows-miniconda-install
C:\Users\xyz>conda install -c anaconda scipy=0.18.1
Fetching package metadata .............
Solving package specifications:
Package plan for installation in environment C:\Users\xyz\Miniconda3:
The following NEW packages will be INSTALLED:
mkl: 2017.0.1-0 anaconda
numpy: 1.12.0-py36_0 anaconda
scipy: 0.18.1-np112py36_1 anaconda
The following packages will be SUPERCEDED by a higher-priority channel:
conda: 4.3.11-py36_0 --> 4.3.11-py36_0 anaconda
conda-env: 2.6.0-0 --> 2.6.0-0 anaconda
Proceed ([y]/n)? y
conda-env-2.6. 100% |###############################| Time: 0:00:00 32.92 kB/s
mkl-2017.0.1-0 100% |###############################| Time: 0:00:24 5.45 MB/s
numpy-1.12.0-p 100% |###############################| Time: 0:00:00 5.09 MB/s
scipy-0.18.1-n 100% |###############################| Time: 0:00:02 5.59 MB/s
conda-4.3.11-p 100% |###############################| Time: 0:00:00 4.70 MB/s
Upvotes: 6
Reputation: 1139
Alternatively, manually download and execute http://www.lfd.uci.edu/~gohlke/pythonlibs Scipy version suitable for you. Consider your Python version (python --version) and your system architecture (32/64 bit). Choose the Scipy version accordingly. scipy-0.18.1-cp27-cp27m-win32 - for Python 2.7 32 bit scipy-0.18.1-cp27-cp27m-win_amd64 - for Python 2.7 64 bit Otherwise the error scipy-0.15.1-cp33-none-win_amd64.whl.whl is not supported wheel on this platform will popup on installation.
Now change directory to the downloaded file and execute command
pip install scipy-0.15.1-cp33-none-win_amd64.whl.whl
(change file name appropriately)
I have added this answer only because the Arun's answer(found useful by myself) has not mentioned anything about 32/64 bit matching which i have faced.
Upvotes: 1
Reputation: 361
If you are totally new to python read step by step or go directly to last step. Follow the below method to install scipy 0.18.1 on Windows 64-bit , Python 64-bit . If below command is not working then proceed further
pip install scipy
Be careful with the versions of
Python
Windows
.whl version of numpy and scipy files
First install numpy and scipy.
pip install FileName.whl
For Numpy:http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy For Scipy:http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
Be aware of the file name (check the version number).
Ex :scipy-0.18.1-cp35-cp35m-win_amd64.whl
To check which version is supported by your pip, go to point No 2 below.
If you are using .whl file . Following errors are likely to occur .
- You are using pip version 7.1.0, however version 8.1.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command
- scipy-0.15.1-cp33-none-win_amd64.whl.whl is not supported wheel on this platform
For the above error: start Python and type :
import pip
print(pip.pep425tags.get_supported())
Output:
[('cp35', 'cp35m', 'win_amd64'), ('cp35', 'none', 'win_amd64'), ('py3', 'none', 'win_amd64'), ('cp35', 'none', 'any'), ('cp3', 'none', 'any'), ('py35', 'none', 'any'), ('py3', 'none', 'any'), ('py34', 'none', 'any'), ('py33', 'none', 'any'), ('py32', 'none', 'any'), ('py31', 'none', 'any'), ('py30', 'none', 'any')]
In the output you will observe cp35 is there , so download cp35 for numpy as well as scipy.Further edits are most welcome.
Upvotes: 9
Reputation: 4458
This is an alternative to pip. I also had the same error when installing scipy with pip.
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.
Upvotes: 5
Reputation: 111
Try downloading the scipy file from the below link
https://sourceforge.net/projects/scipy/?source=typ_redirect
It will be a .exe file and you just need to run it. But be sure to chose the scipy version corresponding to your python version.
When the scipy.exe file is run it will locate the python directory and will be installed .
Upvotes: 0
Reputation: 631
If you are using CentOS you need to install lapack-devel like so:
$ yum install lapack-devel
Upvotes: 0
Reputation: 18093
After opening up an issue with the SciPy team, we found that you need to upgrade pip with:
pip install --upgrade pip
And in Python 3
this works:
python3 -m pip install --upgrade pip
for SciPy to install properly. Why? Because:
Older versions of pip have to be told to use wheels, IIRC with --use-wheel. Or you can upgrade pip itself, then it should pick up the wheels.
Upgrading pip solves the issue, but you might be able to just use the --use-wheel
flag as well.
Upvotes: 135
Reputation: 174
pip install
the file.import scipy
; it worked for me with no errors.Upvotes: 5
Reputation: 1458
I face same problem when install Scipy under ubuntu.
I had to use command:
$ sudo apt-get install libatlas-base-dev gfortran
$ sudo pip3 install scipy
You can get more details here Installing SciPy with pip
Sorry don't know how to do it under OS X Yosemite.
Upvotes: 68
Reputation: 589
After finding this answer for some clues, I got this working by doing
brew install gcc
pip install scipy
(The first of these steps took 96 minutes on my 2011 Mac Book Air so I hope you're not in a hurry!)
Upvotes: 13