在窗户下扭曲
Twisted 位于 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
出了什么问题?
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.0
what's wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来您已经在 Python 2.6 环境中安装了 Twisted,但正在使用 Python 2.7 来运行它。我认为以下命令应该有效:(
看起来
twistd.py
脚本正在由与 .py 文件扩展名关联的 python.exe 二进制文件运行 - 在您的情况下,它似乎是 Python 2.7或者,您可以将 PYTHONPATH 环境变量设置为指向 Python 2.7 site-packages 目录。)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:
(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.)