如何让easy_install在Jython的Windows上运行?

时间:2014-08-22 05:49:40

标签: windows batch-file pip jython easy-install

我正在尝试在Windows 7中运行easy_setup,因为我需要安装pip。安装pip后,我想安装pytz。但是在安装easy_install之后,我遇到了使用它的问题。

我在Windows 7上安装了jython2.7b2 然后我去下载setuptools-0.6c11-py2.7.egg和ez_setup.py。 我将它们放在同一目录中,然后运行:

C:\Users\mike\Downloads>jython ez_setup.py
Processing setuptools-0.6c11-py2.7.egg
Copying setuptools-0.6c11-py2.7.egg to c:\jython2.7b2\lib\site-packages
Adding setuptools 0.6c11 to easy-install.pth file
Installing easy_install-2.7 script to C:\jython2.7b2\bin
Installing easy_install script to C:\jython2.7b2\bin

Installed c:\jython2.7b2\lib\site-packages\setuptools-0.6c11-py2.7.egg
Processing dependencies for setuptools==0.6c11
Finished processing dependencies for setuptools==0.6c11

我尝试运行easy_install文件,但当然它不是bat文件所以它不会执行。

C:\Users\mike>easy_install pip
'easy_install' is not recognized as an internal or external command,
operable program or batch file.

如何让它在Windows中运行?我想安装pip。还有另一种安装pip的方法吗?

easy_install文件包含:

#!C:\jython2.7b2\jython.bat
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==0.6c11','console_scripts','easy_install'
__requires__ = 'setuptools==0.6c11'
import sys
from pkg_resources import load_entry_point

sys.exit(
   load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')()
)

1 个答案:

答案 0 :(得分:0)

我通过手动将python库移动到jython,尝试使用Jython 2.7.0,如下面的链接。

Jython easy_install error

请参阅pitchblack408的答案。

答案很晚但可能对某人有帮助。