简体   繁体   English

扭曲在窗户下

[英]Twisted under windows

Twisted located at C:\\Python26\\Lib\\site-packages\\Twisted-11.0.0-py2.6-win32.egg\\twisted Twisted位于C:\\ Python26 \\ Lib \\ site-packages \\ Twisted-11.0.0-py2.6-win32.egg \\ twisted

but

C:\projects\webmorda>twistd -n morda_server
Traceback (most recent call last):
  File "C:\Python26\Scripts\twistd.py", line 4, in <module>
    import pkg_resources
  File "C:\Python27\lib\site-packages\pkg_resources.py", line 2671, in <module>
    working_set.require(__requires__)
  File "C:\Python27\lib\site-packages\pkg_resources.py", line 654, in require
    needed = self.resolve(parse_requirements(requirements))
  File "C:\Python27\lib\site-packages\pkg_resources.py", line 552, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: twisted==11.0.0

what's wrong? 怎么了?

It looks like you have installed Twisted in a Python 2.6 environment but are using Python 2.7 to run it. 看起来您已在python 2.6环境中安装了Twisted,但正在使用python 2.7运行它。 I think the following command should work: 我认为以下命令应该起作用:

C:\Python26\python.exe C:\Python26\Scripts\twistd.py -n morda_server

(It looks like the twistd.py script is being run by the python.exe binary associated with the .py file extension - which in your case appears to be Python 2.7. Alternatively you have a PYTHONPATH environment variable set up to point to the Python 2.7 site-packages directory.) (看起来twistd.py脚本正在由与.py文件扩展名关联的python.exe二进制文件运行-在您的情况下,它似乎是Python 2.7。或者,您设置了PYTHONPATH环境变量来指向Python 2.7 site-packages目录。)

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

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