Error installing scipy library via pip on python 3: "compilation failed with error code 1"

I am trying to install scipy library via pip on python 3.3.5. At the end of the script, I get this error:

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 --s-version-external-manage -compile failed with error code 1 in / private / tmp / pip _build_root / SciPy Saving the debug log for failure in /Users/dan/.pip/pip.log

+7
python scipy pip
source share
4 answers

I got the same when using pip, I went to install and pointed out the following dependencies.

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

+17
source share
 $ python3 -m pip install --upgrade pip $ python3 -m pip install scipy 

Worked for me! Had the same problem!

+3
source share

I downloaded the source from https://github.com/scipy/scipy and was able to build and install it using python 3.

+1
source share

For Windows users who encounter a similar error and arrive here: You can install scipy as described in the Scipy Installation Instructions on the website

0
source share

All Articles