简体   繁体   English

PyCharm解释器添加

[英]PyCharm interpreter adding

I try to use my python 3.6 environment in the anaconda. 我尝试在anaconda中使用我的python 3.6环境。 Its path is "~/anaconda/envs/py36". 它的路径是“〜/ anaconda / envs / py36”。 It works fine except I cannot add new package. 它工作正常,除非我无法添加新软件包。 It shows "nothing to show". 它显示“无内容显示”。

I have added " https://pypi.python.org/simple ", and when I use the system default python3, there shows something. 我添加了“ https://pypi.python.org/simple ”,当我使用系统默认的python3时,显示了一些内容。 Therefore I think it should be an issue in my environment. 因此,我认为这应该是我的环境中的一个问题。

When I add the environment, in the directory I saw there are python(application), python3.6(document). 添加环境时,在目录中,我看到了python(application)和python3.6(document)。 I don't know which I should select. 我不知道该选哪个。 If I select python3.6, it will change to python in the path, and they don't look like the same file. 如果我选择python3.6,它将在路径中更改为python,它们看起来不像是同一文件。

Need your help! 需要你的帮助!

在此处输入图片说明

在此处输入图片说明 在此处输入图片说明

Configuring your interpreter in pycharm as above will allow PyCharm code inspection to highlight if imported packages cannot be found and will also allow you to jump to code in installed packages. 如上所述,在pycharm中配置您的解释器将允许PyCharm代码检查突出显示是否找不到导入的软件包,并且还允许您跳至已安装软件包中的代码。

In order to install new package into your environment, you need to open a terminal, activate your conda environment: activate py36 and then run conda install <package-name> . 为了将新软件包安装到您的环境中,您需要打开一个终端, activate py36环境: activate py36 ,然后运行conda install <package-name> Thereafter you can reopen the settings and the newly installed package should be listed as installed under that interpreter. 此后,您可以重新打开设置,新安装的软件包应在该解释器下列出为已安装。

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

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