简体   繁体   English

关于Pycharm中的设置项目解释器,并使其指向在Anaconda中创建的虚拟环境

[英]regarding setup project interpreter in Pycharm and make it point to a virtual environment created within Anaconda

I have created a virtual environment, ie, TF , under Anaconda. 我在Anaconda下创建了一个虚拟环境,即TF Within this virtual environment, TF , I have installed all the packages that I need for my project. 在这个虚拟环境TF ,我已经安装了项目所需的所有软件包。 At present, I also install Pycharm . 目前,我还安装了Pycharm For a given project, eg, testPycharmAnaconda , how can I develop it using Pycharm , while ensure the interpreter for this project using the virtual environment TF installed in Anaconda. 对于给定的项目,例如testPycharmAnaconda ,我如何使用Pycharm开发,同时确保使用Anaconda中安装的虚拟环境TF对该项目进行解释。

I go to the setting page of Pycharm , for the three options on the right panel, which one should I choose, and how to finish the according setup? 我进入Pycharm的设置页面, Pycharm右侧面板上的三个选项,我应该选择哪个,以及如何完成相应的设置? Thanks. 谢谢。

check the image 检查图像

Then as suggested, I choose the conda environment, the following figure shows how I make selection 然后按照建议,选择conda环境,下图显示了如何进行选择

在此处输入图片说明

But after making the selection, I got the following error message, 但是在做出选择之后,我收到以下错误消息,

在此处输入图片说明

You are correct in selecting the environment "Conda Environment" in the middle :) 您在中间选择环境“ Conda Environment”是正确的:)

this will let you use your newly created anaconda environment 这将使您可以使用新创建的anaconda环境

I found a few resources that might help you in the future: (the UI is different in several of these but do not worry) 我发现了一些将来可能对您有帮助的资源:(其中一些UI有所不同,但请不要担心)

https://medium.com/@GalarnykMichael/setting-up-pycharm-with-anaconda-plus-installing-packages-windows-mac-db2b158bd8c https://medium.com/@GalarnykMichael/setting-up-pycharm-with-anaconda-plus-installing-packages-windows-mac-db2b158bd8c

https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html.html#conda https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html.html#conda

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM