geoscript / geoscript-py

A Python GeoScript Implementation
http://geoscript.net/py
MIT License
52 stars 25 forks source link

No module named java.lang #33

Closed ustroetz closed 10 years ago

ustroetz commented 10 years ago

Installation all worked smoothly. But when I try

>>> import geoscript

I get

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "geoscript/__init__.py", line 2, in <module>
    from java.lang import System
ImportError: No module named java.lang
jdeolive commented 10 years ago

Hey Ulrich, what installation method did you use? This error makes me think that you're trying to run geoscript on a non Jython runtime?

ustroetz commented 10 years ago

Hey Justin, I installed it as described here: http://geoscript.org/py/devel.html#devel. I think you are right if I use a Jython terminal it works fine. But if I use a Python terminal I get the described error. So is it even possible to use geoscript in a simple python script?

jdeolive commented 10 years ago

Ok, that makes sense. So no, it's not possible to run geoscript on any other python runtime than jython. GeoScript is built on top of GEoTools (a java library) so it requires a Java runtime to operate. I guess we need to make this more evident in that guide.

On Fri, May 30, 2014 at 7:50 AM, Ulrich Stroetz notifications@github.com wrote:

Hey Justin, I installed it as described here: http://geoscript.org/py/devel.html#devel. I think you are right if I use a Jython terminal it works fine. But if I use a Python terminal I get the described error. So is it even possible to use geoscript in a simple python script?

— Reply to this email directly or view it on GitHub https://github.com/geoscript/geoscript-py/issues/33#issuecomment-44652471 .

Justin Deoliveira Vice President, Engineering | Boundless jdeolive@boundlessgeo.com @j_deolive https://twitter.com/j_deolive

ustroetz commented 10 years ago

Okay cool. Thanks for explaining that.