Jython ImportError:没有名为urllib的模块

时间:2015-01-08 09:37:54

标签: jython-2.7

刚刚安装了Jython 2.7beta3并在mac os x下的Jython下进行了

尝试运行/usr/local/Cellar/jython/2.7-b3/libexec/bin/pip安装请求

获取错误:

Traceback (most recent call last):
  File "./pip", line 8, in <module>
    sys.exit(
  File "/usr/local/Cellar/jython/2.7-b3/libexec/Lib/site-packages/setuptools-11.3.1-py2.7.egg/pkg_resources/__init__.py", line 519, in load_entry_point
  File "/usr/local/Cellar/jython/2.7-b3/libexec/Lib/site-packages/setuptools-11.3.1-py2.7.egg/pkg_resources/__init__.py", line 2630, in load_entry_point
  File "/usr/local/Cellar/jython/2.7-b3/libexec/Lib/site-packages/setuptools-11.3.1-py2.7.egg/pkg_resources/__init__.py", line 2310, in load
  File "/usr/local/Cellar/jython/2.7-b3/libexec/Lib/site-packages/setuptools-11.3.1-py2.7.egg/pkg_resources/__init__.py", line 2316, in resolve
  File "/usr/local/Cellar/jython/2.7-b3/libexec/Lib/site-packages/pip-6.0.6-py2.7.egg/pip/__init__.py", line 15, in <module>
    from pip.vcs import git, mercurial, subversion, bazaar  # noqa
  File "/usr/local/Cellar/jython/2.7-b3/libexec/Lib/site-packages/pip-6.0.6-py2.7.egg/pip/vcs/__init__.py", line 8, in <module>
    from pip._vendor.six.moves.urllib import parse as urllib_parse
ImportError: No module named urllib

我发现我无法通过jython下的pip安装任何东西。 请帮我解决,谢谢。

1 个答案:

答案 0 :(得分:0)

我在尝试使用pip for Jython2.7b3时遇到了同样的问题。

我下载了这个: https://github.com/jythontools/pip/tree/master

并运行命令: Jython setup.py install

pip现在正在运行,就像一个魅力。