0

My purpose to add some python libraries to jython i.e suds package

To do this tried to follow the instruction from http://www.jython.org/jythonbook/en/1.0/appendixA.html#setuptools

and also checked;

How can I install various Python libraries in Jython?

Installed Jython 2.5.2 and added JYTHON_HOME=C:\jyhon252 to environment variables and %JYTHON_HOME%\bin to path jython is working fine.

As second step tried to install easy_install on top of Jython 2.5.2

got ez_setup.py from;

http://peak.telecommunity.com/dist/ez_setup.py

Tried to install ez_setup.py and got following error that I couldnt find any clue how to solve it. same thing happening with Jython 2.5.3 also.

C:\tmp\ez_setup>jython ez_setup.py

Downloading http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c11-py2.5.egg

Processing setuptools-0.6c11-py2.5.egg

Removing c:\jython252\lib\site-packages\setuptools-0.6c11-py2.5.egg

Copying setuptools-0.6c11-py2.5.egg to c:\jython252\lib\site-packages

error: c:\jython252\lib\site-packages\setuptools-0.6c11-py2.5.egg: Unknown error: 20047

I had Windows 7 64bit OS and 32 Bit jre 1.6.0_38 available on my device.

Does anyone have any idea how I can solve this? May I missing some thing ?

Thanks in advance..

Community
  • 1
  • 1
huseyinarslan
  • 155
  • 2
  • 9
  • Did you ever figure this out? I was able to get easy_install installed. The new problem now is when I use it, I get socket timeouts all the time. – pitchblack408 Sep 07 '14 at 23:12
  • @pitchblack408 it was because of Windows 7. – huseyinarslan Sep 09 '14 at 05:33
  • So, in reality Jython and Python are not portable like java. I guess people need to stop thinking that Jython and Python are portable. Also the .org sites/ books should state that these languages aren't portable because they don't support the packaging tools necessary for Python and Java. – pitchblack408 Sep 09 '14 at 15:25
  • The real problem is that there is no installer that makes exe files that link to ez_install scripts. so, you can have it create some and then move them over. In Python, some people made exe and msi installers. I don't understand why those people don't modify the installers to work with Jython. So, I manage to get a hack to work. Using ez_install will install pip, but you then run into the issue that pip doesn't have an exe to call to run pip. Someone needs to create an exe and files that link to the pip scripts in the bin and site-packages folder. – pitchblack408 Sep 09 '14 at 15:43

2 Answers2

1

It was because of windows 7, just use another OS.

huseyinarslan
  • 155
  • 2
  • 9
0
  • Remove older versions of java and install jdk7
  • Install JYTHON from jar: java -jar jython-installer-2.7-b2.jar
  • Set up environment variables:
    • Add to existing PATH: C:\jython2.7b2;C:\Program Files (x86)\Java\jdk1.7.0_67\bin
    • Create PYTHON and add: C:\jython2.7b2\Lib\site-packages\;
  • Install easy_install
    • Download ez_setup.py
    • Open file and copy paste intall url into browser to download the setuptools-5.7.zip file.
    • Move the zip into the same folder as ez_setup.py.
    • Then run it: jython setup.py install
    • The easy_install will have moved files to your C:\Python27
    • copy all the files from C:\Python27\Lib\site-packages to C:\jython2.7b2\Lib\site-packages
    • copy all the files from C:\Python27\Scripts to C:\jython2.7b2\bin
    • Delete C:\Python27
  • Finally, you need to edit all the scripts so that they don't use Python.exe.
    • Change it to: #!C:\jython2.7b2\jython.bat
Willi Ballenthin
  • 6,444
  • 6
  • 38
  • 52
pitchblack408
  • 2,913
  • 4
  • 36
  • 54