简体   繁体   English

python扭曲错误“导入pkg_resources”?

[英]python twisted error “import pkg_resources”?

i am try to learn python twisted.i face some error where i run any twisted program, i am can't understand what is problem in my system or in python twisted 我尝试学习python twisted。我在运行任何twisted程序时遇到一些错误,我无法理解系统或python twisted中的问题是什么

and there is error:: 并且有错误::

/usr/lib/python2.7/dist-packages/zope/__init__.py:3: 
UserWarning:Module twisted was already imported from    
/usr/lib/python2.7/dist-packages/twisted/__init__.pyc, but 
/usr/local/lib/python2.7/dist-packages/autobahn-0.10.5_2-py2.7.egg 
is being added to sys.path
import pkg_resources

and there is screen shot: 屏幕截图:

终端屏幕截图

This isn't an error, just a warning (hence UserWarning ) and has to do with the way that you've installed Autobahn. 这不是一个错误,只是一个警告(因此出现UserWarning ),并且与您安装Autobahn的方式有关。 It appears to me that you installed it with sudo pip install , which you should pretty much never do; 在我看来,您是使用sudo pip install安装它的,您几乎应该永远不要这样做; instead sudo apt-get install or pip install things into a virtualenv . 而是sudo apt-get installpip install内容pip installvirtualenv

In any case, it's harmless and you can ignore it. 无论如何,它是无害的,您可以忽略它。

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

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