John
John

Reputation: 131

install numpy on python 3.5 Mac OS High sierra

I wanted to install the numpy package for python 3.5 on my Mac OS High Sierra, but I can't seem to make it work.

I have it on python2.7, but I would also like to install it for the next versions.

Currently, I have installed python 2.7, python 3.5, and python 3.7.

I tried to install numpy using:

I can tell that it is not installed because when I type python3 and then import numpy as np gives "ModuleNotFoundError: No module named 'numpy'"

Any ideas on how to make it work?

Thanks in advance.

Upvotes: 2

Views: 3373

Answers (2)

Sharu
Sharu

Reputation: 77

If running pip3.5 --version or pip3 --version works, what is the output when you run pip3 freeze? If there is no output, it indicates that there are no packages installed for the Python 3 environment and you should be able to install numpy with pip3 install numpy.

Upvotes: 0

Natsfan
Natsfan

Reputation: 4802

First, you need to activate the virtual environment for the version of python you wish to run. After you have done that then just run "pip install numpy" or "pip3 install numpy".

If you used Anaconda to install python then, after activating your environment, type conda install numpy.

Upvotes: 1

Related Questions