java2python
java2python copied to clipboard
Can't find antlr installation
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)
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 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
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.
/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 "
iam experienceing this error
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
Still gives
antlr-3.1.3\runtime\Python\setup.py", line 49
except OSError, exc:
^
SyntaxError: invalid syntax