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?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
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.
I had a similar issue and was able to fix it by creating a new Python system interpreter.
Project Interpreter
->Add Local
->System Interpreter
->/usr/local/bin/python3
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