Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Where is numpy, scipy, etc. for Python 3.7 ??

I have Sagemath installed on my Mac with Python versions 2.7 and 3.7 in the package.
I'm running sage/python as scripts. For Python 2.7 I use the shebang,

#!/Applications/SageMath/local/bin/python2.7

And the code executes correctly including an "import numpy as NP" line.

When I switch to Python 3.7 I use the shebang

#!/Applications/SageMath/local/bin/python3.7

This works for 2to3.py and importing python libs like subprocess and sys, but when I add

import numpy as NP

I get the error,

File "/Users/louispecora/Code_py/PyConversion2to3/testfordivops/DIVchk2to3.2.7.py", line 4, in <module> import numpy as NP ModuleNotFoundError: No module named 'numpy'

I see numpy folder in the pkgs/ at the path

/Applications/SageMath/build/pkgs/numpy

Anyone have an idea why 3.7 can't find numpy, scipy, etc., but 2.7 can?

Thanks for any help.

-- Lou Pecora