java2python icon indicating copy to clipboard operation
java2python copied to clipboard

Can't find antlr installation

Open jkim711 opened this issue 7 years ago • 6 comments

The installation fails to find antlr

[root@localhost j2p]# pip2.7 --proxy http://70.10.15.10:8080 --trusted-host pypi.python.org install ./java2python-0.5.1 Processing ./java2python-0.5.1 Requirement already satisfied (use --upgrade to upgrade): java2python==0.5.1 from file:///root/work/j2p/java2python-0.5.1 in /usr/lib/python2.7/site-packages/java2python-0.5.1-py2.7.egg Collecting antlr_python_runtime==3.1.3 (from java2python==0.5.1) Could not find a version that satisfies the requirement antlr_python_runtime==3.1.3 (from java2python==0.5.1) (from versions: ) No matching distribution found for antlr_python_runtime==3.1.3 (from java2python==0.5.1)

jkim711 avatar Nov 14 '17 05:11 jkim711

Same problem here. I solved it this way:

$ sudo pip install http://www.antlr3.org/download/Python/antlr_python_runtime-3.1.3.tar.gz

Then:

$ sudo pip install java2python

pietropino avatar May 10 '18 12:05 pietropino

@pietropino does not solve the issue on my end. I have a suspicion as to why though pip install http://www.antlr3.org/download/Python/antlr_python_runtime-3.1.3.tar.gz claims to install antlr-python-runtime, but pip install java2python requires antlr_python_runtime Although I don't know pip well enough to know whether or not it differentiates between - and _ in module names

Megacrafter127 avatar Aug 31 '18 01:08 Megacrafter127

Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/antlr3' Consider using the --user option or check the permissions.

TEJABST avatar Sep 26 '18 10:09 TEJABST

/storage/emulated/0 $ pip install http://www.antlr3.org/download/Python/antlr_python_runtime-3.1.3.tar.gz Collecting http://www.antlr3.org/download/Python/antlr_python_runtime-3.1.3.tar.gz Using cached http://www.antlr3.org/download/Python/antlr_python_runtime-3.1.3.tar.gz (76 kB) ERROR: Command errored out with exit status 1: command: /data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/data/data/ru.iiec.pydroid3/cache/pip-req-build-vlc5iesn/setup.py'"'"'; file='"'"'/data/data/ru.iiec.pydroid3/cache/pip-req-build-vlc5iesn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /data/data/ru.iiec.pydroid3/cache/pip-pip-egg-info-fc3e78me cwd: /data/data/ru.iiec.pydroid3/cache/pip-req-build-vlc5iesn/ Complete output (6 lines): Traceback (most recent call last): File "", line 1, in File "/data/data/ru.iiec.pydroid3/cache/pip-req-build-vlc5iesn/setup.py", line 49 except OSError, exc: ^ SyntaxError: invalid syntax ---------------------------------------- WARNING: Discarding http://www.antlr3.org/download/Python/antlr_python_runtime-3.1.3.tar.gz. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. /storage/emulated/0 $

iam experienceing this error

1357koushik avatar Mar 09 '21 08:03 1357koushik

wget https://www.antlr3.org/download/Python/antlr_python_runtime-3.1.3.zip
unzip antlr_python_runtime-3.1.3.zip
cd  antlr_python_runtime-3.1.3.
wget https://files.pythonhosted.org/packages/25/5d/cc55d39ac39383dd6e04ae80501b9af3cc455be64740ad68a4e12ec81b00/setuptools-0.6c11-py2.7.egg
mv setuptools-0.6c11-py2.7.egg setuptools-0.6c5-py2.7.egg
python setup.py install
cd ..
git clone https://github.com/natural/java2python.git
cd java2python
python setup.py install

then finally j2py

DonavanMartin avatar Mar 31 '22 18:03 DonavanMartin

Still gives

antlr-3.1.3\runtime\Python\setup.py", line 49
    except OSError, exc:
                  ^
SyntaxError: invalid syntax

davidalbertonogueira avatar Apr 18 '22 10:04 davidalbertonogueira