Title: Jython does not pick up python modules defined under PYTHONPATH
Type: Severity: normal
Components: Core Versions: 2.5.1
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: amak, cgroves, jpartogi
Priority: Keywords:

Created on 2009-09-10.05:36:50 by jpartogi, last changed 2012-03-19.20:49:11 by amak.

msg5130 (view) Author: Joshua Partogi (jpartogi) Date: 2009-09-10.05:36:49
Currently on windows (haven't tested on windows yet), if we set 
environment variable %PYTHONPATH% or %JYTHONPATH%, currently Jython does 
not pick up any module located under that path.

So if I define my %PYTHONPATH% as:

and from jython command line we invoke this:
>>> import django
it currently returns this error:
Traceback (most recent call last):
  File "", line 5, in <module>
    from import execute_manager
ImportError: No module named django

IMHO Jython should feel as natural as the CPython and enables user to do 
what they can do in CPython
msg5131 (view) Author: Joshua Partogi (jpartogi) Date: 2009-09-10.05:37:43
Sorry, I meant: haven't tested under Unix/Linux yet.
msg5134 (view) Author: Charlie Groves (cgroves) Date: 2009-09-11.07:08:33
PYTHONPATH is ignored by Jython as we want to leave it for CPython so 
CPython and Jython can be used in the same environment.  JYTHONPATH 
should work though.

As a shot in the dark, C:\django\django has a django directory inside of 
it with an in it?  I'd guess C:\django would make more sense 
as a JYTHONPATH value.
msg6870 (view) Author: Alan Kennedy (amak) Date: 2012-03-19.20:49:11
Resolving as a duplicate of #1720
Date User Action Args
2012-03-19 20:49:11amaksetstatus: open -> closed
resolution: duplicate
messages: + msg6870
nosy: + amak
2009-09-11 07:08:33cgrovessetnosy: + cgroves
messages: + msg5134
2009-09-10 05:37:44jpartogisetmessages: + msg5131
2009-09-10 05:36:50jpartogicreate