简体   繁体   English

从PyCharm中的外部库中删除软件包

[英]Removing a package from External libraries in PyCharm

I want to remove the /usr/bin/python2.7/dist-packages/gi package from External Libraries list in my PyCharm project because I don't want PyCharm to pick up code completion cues from this package. 我想从我的PyCharm项目中的“ External Libraries列表中删除/usr/bin/python2.7/dist-packages/gi package ,因为我不希望PyCharm从此软件包中获取代码完成提示。 Why I want to do it? 我为什么要这样做? Because I'm overriding it with another gi package in some other directory, and both of them being there causes code completion issues. 因为我用其他目录中的另一个gi包覆盖了它,并且它们都在其中会导致代码完成问题。

Yes I'm aware my PyGI code won't run without the actual gi package, I'm just doing this for ease of editing. 是的,我知道如果没有实际的gi包,我的PyGI代码将无法运行,我这样做只是为了便于编辑。

The best way to solve this problem is to uninstall the gi package in your Python's environment. 解决此问题的最佳方法是在您的Python环境中卸载gi软件包。 Simply run pip uninstal gi . 只需运行pip uninstal gi You can install it back later when you want. 您可以稍后将其安装回去。

Or, you could create a virtualenv , and just use the packages that you want to be made available to you. 或者,您可以创建一个virtualenv ,并仅使用要使其可用的软件包。

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

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