开发者

Twisted under windows

Twisted located at 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.开发者_如何学Go0

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. 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.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜