无法使用jython 2.7b2作为解释器创建virtualenv

时间:2014-05-30 08:56:07

标签: python virtualenv jython pyro

我想从Python执行一些Java代码,所以我决定安装标准的python解释器,jython并使用pyro4将它们连接在一起。 Pyro4需要python> 2.5所以我选择使用jython 2.7b。以下是我为实现这一目标而采取的措施:

wget -i jython-installer-2.7-b2.jar http://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.7-b1/jython-installer-2.7-b2.jar
java -jar jython-installer-2.7-b2.jar
jython2.7b2/bin/virtualenv-2.7 oscar

这就是我要回来的:

Cannot find file /home/mnowotka/jython2.7b2/Include (bad symlink)
New jython executable in oscar/bin/jython
Installing setuptools.................
  Complete output from command /home/mnowotka/oscar/bin/jython -c "#!python
\"\"\"Bootstra...sys.argv[1:])

" /home/mnowotka/jytho...ols-0.6c11-py2.7.egg:
  Downloading http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg
Traceback (most recent call last):
  File "<string>", line 278, in <module>
  File "<string>", line 210, in main
  File "<string>", line 161, in download_setuptools
  File "/home/mnowotka/jython2.7b2/Lib/socket.py", line 1651, in read
    data = self._sock.recv(recv_size)
  File "/home/mnowotka/jython2.7b2/Lib/httplib.py", line 567, in read
    s = self.fp.read(amt)
  File "/home/mnowotka/jython2.7b2/Lib/socket.py", line 1669, in read
    data = self._sock.recv(recv_size)
  File "/home/mnowotka/jython2.7b2/Lib/socket.py", line 174, in handle_exception
    raise _map_exception(jlx)
socket.error: [Errno 32] Socket closed
----------------------------------------
...Installing setuptools...done.
Traceback (most recent call last):
  File "jython2.7b2/bin/virtualenv-2.7", line 3, in <module>
    virtualenv.main()
  File "/home/mnowotka/jython2.7b2/Lib/site-packages/virtualenv.py", line 970, in main
    create_environment(home_dir,
  File "/home/mnowotka/jython2.7b2/Lib/site-packages/virtualenv.py", line 1090, in create_environment
    install_setuptools(py_executable, unzip=unzip_setuptools,
  File "/home/mnowotka/jython2.7b2/Lib/site-packages/virtualenv.py", line 610, in install_setuptools
    _install_req(py_executable, unzip,
  File "/home/mnowotka/jython2.7b2/Lib/site-packages/virtualenv.py", line 579, in _install_req
    call_subprocess(cmd, show_stdout=False,
  File "/home/mnowotka/jython2.7b2/Lib/site-packages/virtualenv.py", line 1055, in call_subprocess
    raise OSError(
OSError: Command /home/mnowotka/oscar/bin/jython -c "#!python
\"\"\"Bootstra...sys.argv[1:])

这是否意味着jython 2.7b2尚未准备好或者我做错了什么?

1 个答案:

答案 0 :(得分:-1)

使用此ez_setup.py安装setuptools:

added setuptools-egg and md5