Pycharm cannot import math module
21,609
Solution 1
Check that you are pointing to the correct python file within Settings > Project > Project Interpreter.
When I've had this problem in the past my interpreter was pointing at python3.6 and not python within the bin folder of my venv. I simply dropped the interpreter and added it again pointing to the venv-name/bin/python
Solution 2
File >> Settings >> Project interpreter. You should see a list of currently installed packages/libraries. If the module is not specified in there click the plus sign and look for your module in there. Also make sure you specify it correctly when you import it.
Related videos on Youtube
Author by
Michael
Updated on July 09, 2022Comments
-
Michael almost 2 years
I can't import standard math module in pycharm, I'm getting an error: "No module named math", from python shell I can import it, what can cause that?
-
DavidG over 6 yearsYou are going to have to provide more information on the code you use and how you have setup PyCharm
-
jciloa over 6 yearsUpdating PyCharm solved it for me!
-
-
Michael over 6 yearsI don't see math here, and I cannot install it from here.
-
Maximouse almost 4 yearsPlease note the question says "I can't import the standard math module".