Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't find antlr installation #54

Open
jkim711 opened this issue Nov 14, 2017 · 6 comments
Open

Can't find antlr installation #54

jkim711 opened this issue Nov 14, 2017 · 6 comments

Comments

@jkim711
Copy link

jkim711 commented Nov 14, 2017

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)

@pietropino
Copy link

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

@Megacrafter127
Copy link

@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

@TEJABST
Copy link

TEJABST commented Sep 26, 2018

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.

@1357koushik
Copy link

/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

@DonavanMartin
Copy link

DonavanMartin commented Mar 31, 2022

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

@davidalbertonogueira
Copy link

Still gives

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants