1

I'm using pip to install python packages on macOS Sierra. When I pip install scipy and try to import it, python can't find the module. However when I pip install numpy and do the same thing, it seems to work. What's going wrong?

3
  • Can you post the exact pip install commands you used, and the exact Python code you're using to try to import them? Also can you post your PATH environment variable?
    – Steve
    Jan 20, 2017 at 0:32
  • Hi @Steve It's nothing at all fancy to install I typed in the command prompt pip install scipy Then I opened up python2.7 and imported scipy to see if it worked like so python import scipy and an import error arose $PATH = /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin Jan 20, 2017 at 9:12
  • I'm about to post a similar question. Apparently if a module already exists in the directories in sys.path, trying to install a different version with pip won't override what's there. But if you install a module that is not included in Apple's stock Python install, it will be seen without trouble.
    – Tango
    Jul 12, 2018 at 6:52

0

You must log in to answer this question.

Browse other questions tagged .