如何通过设置conda环境在PyCharm中添加conda的所有软件包? [英] How to add all the packages of conda in PyCharm by setting conda environment?

查看:307
本文介绍了如何通过设置conda环境在PyCharm中添加conda的所有软件包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在PyCharm中设置conda环境.它设置成功,但是在显示所有软件包时,它仅显示我通过conda安装的所有软件包中的几个.这是我的终端的屏幕截图,显示了所有的conda程序包

I am trying to set the conda environment in PyCharm. It sets successfully, but when displaying all the packages, it shows only a few of all the packages I have installed through conda. Here are the screenshots of my terminal showing all the conda packages

以及PyCharm显示的内容

and what PyCharm shows

为什么在PyCharm中也没有找到conda中的所有软件包?

推荐答案

您可能将所有这些软件包安装在与PyCharm中设置的环境不同的环境中.

You probably installed all these packages in an environment different from the one set up in PyCharm.

在终端中,您可以键入 conda env list 来查看所有环境的列表.在终端中带有星号 * 的那个是活动的那个(意思是您将软件包安装到其中的那个).

In the terminal you can type conda env list to see the list of all the environments you have. The one with the star * is the active one in the terminal (meaning the one you install the packages into).

您可以通过执行 source activate< environment_name> 来切换到另一个环境.然后,您可以在新的活动环境中安装软件包.

You can switch to another environment by doing source activate <environment_name>. Then you can install the packages in the new active environment.

另一种始终在您的项目所使用的环境中安装软件包以使用PyCharm中的嵌入式终端的方法.

Another way of always installing packages in the environment your project uses in to use the embedded terminal in PyCharm.

这篇关于如何通过设置conda环境在PyCharm中添加conda的所有软件包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆