PyCharm cannot find the packages in virtualenv

前端 未结 9 825
感情败类
感情败类 2020-12-28 12:40

I have the latest PyCharm CE and am using it with virtualenv. I have defined the interpreter as the interpreter in the virtualenv. The Project Inte

相关标签:
9条回答
  • 2020-12-28 13:31

    For me, the easiest solution was to open the project in the root directory (my project has a server and client directories, thus the root directory contained both of them). When you open the project in the root directory, it is able to find the dependencies without messing with pycharm settings as it uses them by convention.

    0 讨论(0)
  • 2020-12-28 13:31

    I was not able to assign existing virtual environment to my project, but after going to

    File -> Settings -> project interpreter-> show all-> click on '+'

    to create a new virtual environment or we can choose the existing virtual environment, I am able to assign and use the existing virtual enviroments.

    0 讨论(0)
  • 2020-12-28 13:37

    In the newest version of PyCharm (2016.1.4 in my case):

    • Settings
    • Project: name of project
      • project Interpreter
      • at the right side there will be a dropdown where you can choose the interpreter. There should be venv options.

    See image below for better explanation (like they said, 1 picture worth thousands word)

    0 讨论(0)
提交回复
热议问题