natural / java2python

Simple but effective library to translate Java source code to Python.
GNU Lesser General Public License v2.1
564 stars 243 forks source link

can not install #59

Open zaoqi opened 5 years ago

zaoqi commented 5 years ago
$ pip install java2python
Collecting java2python
  Downloading https://files.pythonhosted.org/packages/e4/4d/96dd48650ebe9dcdcbef4e61840e9efdf240b34cee6bdb8ea8de6749d1e5/java2python-0.5.0.tar.gz (138kB)
    100% |████████████████████████████████| 143kB 23kB/s 
Collecting antlr_python_runtime==3.1.3 (from java2python)
  Could not find a version that satisfies the requirement antlr_python_runtime==3.1.3 (from java2python) (from versions: )
No matching distribution found for antlr_python_runtime==3.1.3 (from java2python)
jurentie commented 5 years ago

@zaoqi I ran into the same issue. My problem was that I was trying to run using Python3. I found [here] that java2Python requires Python2.7. Python2.7.9 was the first version with pip capability to I installed this Python version. Ran py -2 -m pip install java2python and it worked.

I also had run py -2 -m pip install install http://antlr3.org/download/Python/antlr_python_runtime-3.1.3.tar.gz so I am unsure if this is needed before.

ilkeuygun commented 5 years ago

@jurentie Thank you for pointing Python 2.7.9 out. Can you please fix your link in "I found [here] that" part.

Thanks,

phs-sakshi commented 4 years ago

even after this when I run j2py HelloWorld.java it shows me j2py is not an internal or external command. PS- I have my PATH variables set to ../Python27 and ../Python27/Scripts

MrKomodoDragon commented 3 years ago

@jurentie I am on a Mac, and when I attempt to run py -2 -m pip install java2python, it says command not found. Anything I can do?

MrKomodoDragon commented 3 years ago

Never mind! Ran python2.7 -m pip install java2python and worked succesfully!