简体   繁体   English

pyCharm无法看到环境中的软件包

[英]Package in enviorment is not seen by pyCharm

I've been trying to install this package into Anaconda3. 我一直在尝试将此软件包安装到Anaconda3中。 https://github.com/ratal/mdfreader but it doesn't show in pyCharm when i use that enviorment as default enviorment. https://github.com/ratal/mdfreader,但是当我使用该环境作为默认环境时,它不会在pyCharm中显示。

For example here it is with PyQt5 and pyqt5-tools. 例如,这里是PyQt5和pyqt5-tools。 https://i.imgur.com/vThrZN1.png https://i.imgur.com/vThrZN1.png

It shows on the left on command 它显示在命令的左侧

conda install

but not on the left when i try to set that enviorment as the default interpreter. 但当我尝试将该环境设置为默认解释器时,则不在左侧。 Same goes for the package i want to install (mdfreader). 我要安装的软件包(mdfreader)也是如此。

I've looked everywhere and i cannot find a fix for this. 我到处都看了,找不到解决办法。

I tried deactivating and activating the environment again; 我尝试再次停用并激活环境; creating a new one and installing there. 创建一个新的并在那里安装。

Any tips? 有小费吗?

EDIT: I installed these 2 packets also in my other environment using: 编辑:我也在其他环境中使用以下命令安装了这2个数据包:

activate Anaconda3Main

to activate my "Anaconda3Main" enviorment and then using 激活我的“ Anaconda3Main”环境,然后使用

pip install ####

consecutively for the packages. 连续获取包裹。 They show up in: 它们显示在:

conda list

after i activate this enviorment but they still don't show in pyCharm. 我激活此环境后,但它们仍未在pyCharm中显示。

I think you confused environment. 我认为您感到困惑的环境。

You said you installed with 您说您安装了

activate Anaconda3Main

and the packages are there. 包在那里。 But you are using main conda python (according the screenshot). 但是您正在使用主要的conda python(根据屏幕截图)。

I would try to change the python environment in pyCharm, to use Anaconda3Main interpreter. 我会尝试在pyCharm中更改python环境,以使用Anaconda3Main解释器。 Note: it takes some time to read the new environment). 注意:读取新环境需要一些时间。

Some people starts pyCharm from inside an environment (so after an activate ). 有些人从环境内部启动pyCharm(因此,在activate )。 This is specially needed, if a module uses some executables or other stuff in environment. 如果模块在环境中使用某些可执行文件或其他内容,则特别需要此设置。 PyCharm just sets up PYTHONPATH, but not PATH when executing from an environment. 从环境执行时,PyCharm只会设置PYTHONPATH,而不会设置PATH。

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

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