Can't find python module

James Rome jamesrome at gmail.com
Sat Jan 10 05:43:15 PST 2015


I am trying to use j2py. But it keeps asking for the antlr3 module. I
installed antlr3 and py-antlr3, but it is still not finding them.
....
    from java2python.compiler import template, visitor
  File
"/Library/Python/2.7/site-packages/java2python/compiler/template.py",
line 20, in <module>
    from java2python.lang import tokens
  File "/Library/Python/2.7/site-packages/java2python/lang/__init__.py",
line 7, in <module>
    from java2python.lang.JavaLexer import JavaLexer as Lexer
  File
"/Library/Python/2.7/site-packages/java2python/lang/JavaLexer.py", line
4, in <module>
    from antlr3 import *
ImportError: No module named antlr3

I have
export
PYTHONPATH="/opt/local/Library/Frameworks/Python.framework/Versions/2.7/site-packages":$PYTHONPATH
export PYTHON=/opt/local/bin/python

Note that there is no site-packages directory!

-- 
James A. Rome

http://jamesrome.net



More information about the macports-users mailing list