0

First of all, I want to note that I've read a lot of links related to my problem. I have some problems with running the code when I want to import a module.

Here is an example of the code:

import numpy as np

Then PyCharm gives me an exception:

Traceback (most recent call last):

File "/Users/Alexander 1 2/PycharmProjects/Coursera/Week1/Vectors/Vecors.py", line 1, in

import numpy as np

ModuleNotFoundError: No module named 'numpy'

Process finished with exit code 1

I have read this and did all what was written. However, it hasn't been working. I've reloaded the PyCharm – no result.

screenshot that proves that I chose Project Interpreter

Help me, please! I'm using MacOS 10.13.5, PyCharm 2018.1.4 CE.

Morix Dev
  • 2,700
  • 1
  • 28
  • 49

2 Answers2

0

You probably have created a new project using virtualenv, read about it here. It basically creates a new project specific environment, so the libraries inside won't cause a conflict with python2 and python3 packages. So, inside Pycharm, open terminal by pressing alt+f12 , which will open a terminal inside Pycharm, and install numpy usually by pip install numpy

toxdes
  • 421
  • 4
  • 8
  • I did what you said and it answered me Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (1.14.5) So, unfortunately, it did not help :( – Alexander Polishchuk Jun 15 '18 at 15:03
0

I don't know why, but when I rebooted the computer and created a new project, this problem has disappeared.