Can Import Modules in Pycharm - ModuleNotFoundError: - Problem Fixed
Hi all,
I cant seem to get modules to import.
I'm new to pycharm and python so maybe I'm just doing something stupid
here is an example of the error and the code it came from when importing numpy:
---------------------------------
import sys as s
#import pandas as pd
import numpy as np
#__import__(numpy) as np
garray = np.array([1,2,3])
for n in garray:
print(n)
C:\Users\Scott\venv\code-play\Scripts\python.exe C:/Users/Scott/PycharmProjects/code-play/fun-np
Traceback (most recent call last):
File "C:/Users/Scott/PycharmProjects/code-play/fun-np", line 3, in <module>
import numpy as np
ModuleNotFoundError: No module named 'numpy'
Process finished with exit code 1
----------------------------------
Here is the project interpreter setting, and numpy is there.
Also here are my environmental variables.
I've also tried uninstalling and re-installing both python and pycharm.
any help would be much appreciated,
Scott
Please sign in to leave a comment.
Ok so I fixed my own problem, here is the problem:
I was right cliking the project folder and selecting: New > File (at top of list)
Solution:
Select: New > Python File,
As well as going to project interpreter and selecting: "Python 36 C:\Program Files\Python36\python.exe",
hope someone finds this useful,
Scott
Scott, it helped me. Thank you for posting it.
Thank you, Scott! Helped me a lot!
Thank you!!
helped me al lot