Scipy Installing to Wrong Place on Mountain Lion?

python, scipy

Solution

From the `pip` documentation page:

Edit mode Packages normally install under site-packages, but when you’re making changes, it makes more sense to run the package straight from the checked-out source tree. “Editable” installs create a .pth file in site-packages that extends Python’s import path to find the package:

$ pip install -e path/to/SomePackage

So this means you can simply solve your problems by running:

 $ sudo mv src/scipy/scipy /Library/Python/2.7/site-packages/

And then if you want to be clean, you can edit the file to remove the line that was added by `pip`:

 $ sudo vim /Library/Python/2.7/site-packages/easy-install.pth

Problem

Tried installing scipy on Mountain Lion, and couldn't get anything to work except: sudo pip install -e git+https://github.com/scipy/scipy#egg=scipy-dev which I believe installs the development version of scipy. For some reason it leaves an `src` directory inside my current folder, which contains a `pip-delete-this-directory.txt` and `scipy` directory containing all scipy files. I can import scipy from anywhere, but removing this folder removes scipy entirely. What's going on? If I try installing with simply sudo pip install scipy, I get the following ``` /System/Library/Frameworks/vecLib.framework/Headers/vecLib.h:22:4: error: "<vecLib/vecLib.h> is deprecated. Please #include <Accelerate/Accelerate.h> and link to Accelerate.framework." #error "<vecLib/vecLib.h> is deprecated. Please #include <Accelerate/Accelerate.h> and link to Accelerate.framework." ^ 1 error generated. error: Command "clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -Iscipy/sparse/linalg/eigen/arpack/ARPACK/SRC -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include -c scipy/sparse/linalg/eigen/arpack/ARPACK/FWRAPPERS/veclib_cabi_c.c -o build/temp.macosx-10.8-intel-2.7/scipy/sparse/linalg/eigen/arpack/ARPACK/FWRAPPERS/veclib_cabi_c.o" failed with exit status 1 ```

Original source