PyCharm to use virtualenv and dependencies created by PyCharm

99封情书 提交于 2021-02-05 10:50:08

问题


I have created a virtualenv using command prompt and have installed all my dependencies. How can I make PyCharm use the virtual env & dependencies created via command prompt?


回答1:


You should link the virtualenv in PyCharm.
In order to do this, go to:

File -> Settings -> Project -> Project Interpreter

Here, in the top right corner of the window, click on the gear icon and choose Add.
Then, choose Existing environment option and navigate in your computer until you find the python.exe for your virtualenv.

Than confirm modifications clicking Ok. This should be enough.

If you want to use it in a PyCharm configuration, please do not forget to choose it in the Python Interpreter option.



来源:https://stackoverflow.com/questions/60417198/pycharm-to-use-virtualenv-and-dependencies-created-by-pycharm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!