无法通过分发将 pip 与 Python 3.2 一起使用
从 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有与 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.
print dist
在 Python3 中无效。它应该是print(dist)
。但是,出现此错误很可能是 pip 与 Python3 不兼容。根据 http://pypi.python.org/pypi/pip 它也不支持Python3 。
print dist
is invalid in Python3. It should beprint(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.