在窗户下扭曲

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

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 

怎么了?

看起来你已经在Python 2.6环境中安装了Twisted,但是使用Python 2.7来运行它。 我认为下面的命令应该可以工作:

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

(它看起来像twistd.py脚本正在由.py文件扩展名相关联的python.exe二进制文件运行 – 你的情况看起来是Python 2.7。或者你有一个PYTHONPATH环境变量设置为指向Python 2.7站点包目录。)