PyCharm doesn't recognize installed modules

Some of the modules I'm trying to import in PyCharm are not recognized (as shown in the picture). The weird thing is that for example, PyCharm is able to recognize 'linkage' from scipy.cluster.hierarchy', but not 'zscore' from 'scipy.stats', meaning that 'scipy' is indeed installed.

I'm using PyCharm 2020.1 and Python 3.7.7

I already tried:

  • Uninstalling and installing PyCharm.
  • Uninstalling and installing Python 3.7.7.
  • Configuring my project interpreter from the start and installing all the packages.
  • Using a different version of Python (3.8.2).
  • Checking the Interpreter paths.
  • Using a virtual environment in the project (venv folder).
  • Making sure the interpreter I'm using matches the python interpreter in the Python console settings.

Any suggestions are welcomed.

Thank you.

 

 

2 comments
Comment actions Permalink

Yoni Itzhak how did you resolve this issue? I have the same problem.

0
Comment actions Permalink

For me I found a solution.

I found out, that `__init__.py` file were not shown as python files in project tree. The issue was that `__init__.py` was included in  Settings --> File Types --> "File type auto-detected by file content". Removing it from there solved the issue

0

Please sign in to leave a comment.