在窗户下扭曲

发布于 2024-12-05 16:14:51 字数 739 浏览 0 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

与风相奔跑 2024-12-12 16:14:51

看起来您已经在 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 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:

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文