1

I installed python 2.7.14 on Macos from the official 64 bit installer. I can install numpy, matplotlib and some other packages easily using pip. However, when I installed scipy and try to use it I got errors.

Installation instructions:

python --version # 2.7.14
python -m pip install --user numpy scipy

The error log produced is following

Bhishan:python
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 12:01:12) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from scipy.optimize import fsolve
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/poudel/Library/Python/2.7/lib/python/site-packages/scipy/optimize/__init__.py", line 240, in <module>
    from .optimize import *
  File "/Users/poudel/Library/Python/2.7/lib/python/site-packages/scipy/optimize/optimize.py", line 37, in <module>
    from .linesearch import (line_search_wolfe1, line_search_wolfe2,
  File "/Users/poudel/Library/Python/2.7/lib/python/site-packages/scipy/optimize/linesearch.py", line 18, in <module>
    from scipy.optimize import minpack2
ImportError: dlopen(/Users/poudel/Library/Python/2.7/lib/python/site-packages/scipy/optimize/minpack2.so, 2): Symbol not found: ___addtf3
  Referenced from: /Users/poudel/Library/Python/2.7/lib/python/site-packages/scipy/optimize/../.dylibs/libquadmath.0.dylib
  Expected in: /usr/lib/libSystem.B.dylib
 in /Users/poudel/Library/Python/2.7/lib/python/site-packages/scipy/optimize/../.dylibs/libquadmath.0.dylib

Platform: OSX yosemite 10.10.5

Update

pip list # has scipy
import scipy # gives no error
from scipy.optimize import fsolve # gives error
phd
  • 82,685
  • 13
  • 120
  • 165
  • Sounds like some dependencies were not installed properly, or are expected to already live on your machine. Also possible that they exist but are out of date. – Mad Physicist Dec 14 '17 at 15:24
  • Possible dupliucate of: https://stackoverflow.com/a/43881512/5658350 – Dhia Dec 14 '17 at 15:27
  • @DhiaTN that question was error using virtualevn, and i am installing directly. That did not solved my problem, thanks for the link. –  Dec 14 '17 at 15:30
  • 1
    Is there no system package? Can't you use anaconda? I would prefer anything to pip-based installs. – sascha Dec 14 '17 at 15:32
  • @sascha I got the same problem with conda also. I had tried anaconda python3. –  Dec 14 '17 at 15:33
  • The above is not enough to debug this. We don't know how you setup anaconda for example and also not how you did install scipy's external needs (a lot!). Read also [this](https://github.com/ContinuumIO/anaconda-issues/issues/3455), which links to one of the big 5 of those external software packages needed: Fortran-compiler, (C, C++, BLAS, LAPACK). – sascha Dec 14 '17 at 15:38
  • @sascha, I looked at the issue, the problem was with conda, here i am installing using pip. –  Dec 14 '17 at 15:41
  • And you can't make out the connection? – sascha Dec 14 '17 at 15:42
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/161220/discussion-between-astro123-and-sascha). –  Dec 14 '17 at 15:46

0 Answers0