Skip to content

ANTLR 3.1.3 not found #40

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

Open
smsaladi opened this issue May 10, 2016 · 6 comments
Open

ANTLR 3.1.3 not found #40

smsaladi opened this issue May 10, 2016 · 6 comments

Comments

@smsaladi
Copy link
Contributor

When trying to install with

pip install java2python

I get the following error message:

(py27)➜ Downloads pip install java2python
Collecting java2python
Using cached java2python-0.5.0.tar.gz
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)

I think the installation instructions might need updating to reflect that the section Install ANTLR Runtime is necessary regardless of whether pip install java2python is used or not.

@smsaladi
Copy link
Contributor Author

I can make the change and submit a PR if you agree.

@mdaffern
Copy link

mdaffern commented Jun 2, 2016

@smsaladi it looks like the installs will work when using the following commands:

pip install http://antlr3.org/download/Python/antlr_python_runtime-3.1.3.tar.gz
pip install https://github.com/downloads/natural/java2python/java2python-0.5.1.tar.gz

I am using python 2.7.11 though. Not sure if this will help if you add the antlr url into the setup file.

@yucer
Copy link

yucer commented Sep 26, 2016

I had the same problem. Installing those two packages. the error is gone during the setup.

But then I receive this error while processing specific .java files:

  File "/home/yucer/.virtualenvs/j2p/local/lib/python2.7/site-packages/java2python/mod/basic.py", line 151, in getSyncHelpersSrc
    from java2python.mod.include import sync
ImportError: No module named include

It results that the include folder is newer than that version.

How can we overcome that error?

@yucer
Copy link

yucer commented Sep 26, 2016

I did solve the problem installing the last version:

> mkvirtualenv j2p
> pip install http://antlr3.org/download/Python/antlr_python_runtime-3.1.3.tar.gz
> git clone https://github.com/natural/java2python.git
> pip install -e java2python

and then using the j2p virtualenv for running it:

> workon j2p
> cd java/code/folder
> j2py myFile.java

@jiangwuyue
Copy link

python j2py \Mac\Home\Downloads\MonkeyCreateScript-master\MonkeyCreateScript\src\com\jikexueyuan\EventModel.java
python: can't open file 'j2py': [Errno 2] No such file or directory

@yucer
Copy link

yucer commented Nov 14, 2020

python j2py \Mac\Home\Downloads\MonkeyCreateScript-master\MonkeyCreateScript\src\com\jikexueyuan\EventModel.java
python: can't open file 'j2py': [Errno 2] No such file or directory

try to remove python from the command line. Or use python -m to run it instead of python-

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

4 participants