Search code examples
pythonpippycharmintellij-plugin

Pycharm - modules belong to specific projects and not to all projects


I had been working with a older version of pycharm for a long long time, and recently I downloaded a new version.

My problem is that for every projects I open, I need to download all the modules that I'm using, meaning modules belong to project and not to pycharm. In addition, For every project I open, it's open a folder of the project for the code and another folder for the modules meaning for every project I got 2 folders, which is very very disappointing...

Someone have solution? I want to link the modules to my python and not to my projects...

Thanks a lot

Omer

By the way - my english is not my native language, please forgive me for any mistakes...

+++ It's also install me pip ( cause every project needs it's own pip :P every time im open project )


Solution

  • This is probably because in your PyCharm, when you create a new project, the interpreter is set to "New Virtualenv environment". Deselect this while creating your project and use the "Existing interpreter" for your project when you create one.

    PyCharm settings

    Make sure you have the right interpreter selected.

    For installing modules throughout, you could just use pip on the command line.

    Ideally though, I would recommend creating a virtual environment for each project, as is currently being done by PyCharm.