无法通过分发将 pip 与 Python 3.2 一起使用

发布于 2024-10-19 10:30:03 字数 1175 浏览 3 评论 0原文

从 src 安装 python3.2 后,我尝试运行:

curl -O http://python-distribute.org/distribute_setup.py
sudo python3.2 distribute_setup.py
sudo python3.2 -m easy_install pip
sudo python3.2 -m pip lxml

这给出了:

Traceback (most recent call last):
  File "/usr/local/lib/python3.2/runpy.py", line 140, in _run_module_as_main
    mod_name, loader, code, fname = _get_module_details(mod_name)
  File "/usr/local/lib/python3.2/runpy.py", line 110, in _get_module_details
    return _get_module_details(pkg_main_name)
  File "/usr/local/lib/python3.2/runpy.py", line 102, in _get_module_details
    loader = get_loader(mod_name)
  File "/usr/local/lib/python3.2/pkgutil.py", line 453, in get_loader
    return find_loader(fullname)
  File "/usr/local/lib/python3.2/pkgutil.py", line 463, in find_loader
    for importer in iter_importers(fullname):
  File "/usr/local/lib/python3.2/pkgutil.py", line 419, in iter_importers
    __import__(pkg)
  File "/usr/local/lib/python3.2/site-packages/pip-0.8.2-py3.2.egg/pip/__init__.py", line 56
    print dist
             ^
SyntaxError: invalid syntax

任何人都能够让它工作吗?

谢谢,

马特

After installing python3.2 from src, I tried running:

curl -O http://python-distribute.org/distribute_setup.py
sudo python3.2 distribute_setup.py
sudo python3.2 -m easy_install pip
sudo python3.2 -m pip lxml

This gives:

Traceback (most recent call last):
  File "/usr/local/lib/python3.2/runpy.py", line 140, in _run_module_as_main
    mod_name, loader, code, fname = _get_module_details(mod_name)
  File "/usr/local/lib/python3.2/runpy.py", line 110, in _get_module_details
    return _get_module_details(pkg_main_name)
  File "/usr/local/lib/python3.2/runpy.py", line 102, in _get_module_details
    loader = get_loader(mod_name)
  File "/usr/local/lib/python3.2/pkgutil.py", line 453, in get_loader
    return find_loader(fullname)
  File "/usr/local/lib/python3.2/pkgutil.py", line 463, in find_loader
    for importer in iter_importers(fullname):
  File "/usr/local/lib/python3.2/pkgutil.py", line 419, in iter_importers
    __import__(pkg)
  File "/usr/local/lib/python3.2/site-packages/pip-0.8.2-py3.2.egg/pip/__init__.py", line 56
    print dist
             ^
SyntaxError: invalid syntax

Anyone able to get this working?

Thanks,

Matt

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

银河中√捞星星 2024-10-26 10:30:03

有与 Python 3 一起使用的 pip 版本。
请参阅我对 Python 3、easy_install、pip 和 pypi 问题的回答。

There is version of pip working with Python 3.
See my answer to Python 3, easy_install, pip and pypi question.

手心的海 2024-10-26 10:30:03

print dist 在 Python3 中无效。它应该是print(dist)

但是,出现此错误很可能是 pip 与 Python3 不兼容。根据 http://pypi.python.org/pypi/pip 它也不支持Python3 。

print dist is invalid in Python3. It should be print(dist).

However, with this error it is very likely that pip is not compatible with Python3. According to http://pypi.python.org/pypi/pip it also does not support Python3.

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