Packages: Unused package issue even though the packages are installed

已回答

Hai Team,

I installed numpy package and trying to use the package. It is displaying as unused import statement.

Project Interpreter:

 

Could you please help me how to resolve this.

NOTE:This is not only with numpy, it is reflecting in same way to all packages.

My main concern is:

After downloading the pycharm what are the default settings i need to check.

Please send this info.

Regards

Suraj Chennoju

INDIA

0

Hi, you have a namespace collision - rename your numpy.py file as it blocks imports from the package.

Also:

  • unmark your project root as source with Right-click on the root in the project tree | Mark Directory as ... | Unmark as a Source Root, there is no point in marking the project root as a source - it will be added to PYTHONPATH anyway
  • exclude the virtual environment folder with Right-click on the venv folder in the project tree | Mark Directory as ... | Excluded, a virtual environment is not a part of your project source code so there's no need for PyCharm to index it searching for TODO items and so on
0

请先登录再写评论。