Search code examples
pythonpycharmanacondapymongoegg

Pycharm doesn't detect installed pymongo package


UPDATE: pycharm can now locate the package, but I can not seem to import anything from the package itself.

-----ORIGINAL---- I've tried installing pymongo through pip. When I check settings, it clearly displays that the package is installed in my venv interpreter.

The location of the installed package is as follows: "C:\Users\Anaconda3\Lib\site-packages\pymongo-3.7.0-py3.6-win-amd64.egg"

Is it something to do with the .egg file?

(I've already tried easy_install but to no avail)

enter image description here


Solution

  • Issue has been resolved.

    As pointed out by Azat Ibrakov, the module name was the same as package name that was causing the problem.

    problem is simple: you should avoid naming your module after some another existing module, your file is called pymongo.py, rename it to something different like playing_with_pymongo.py