Issue2345

classification
Title: Installing pip fails if JYTHON_HOME set and points to old installation
Type: Severity: normal
Components: Versions: Jython 2.7
Milestone:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: pekka.klarck, zyasoft
Priority: Keywords:

Created on 2015-04-26.20:04:56 by pekka.klarck, last changed 2015-04-27.01:51:59 by zyasoft.

Messages
msg9973 (view) Author: Pekka Klärck (pekka.klarck) Date: 2015-04-26.20:04:56
I installed 2.7 rc3 on Windows where I had JYTHON_HOME set so that it pointed to old beta4 installation. After installation finished, I noticed this on the command prompt:

    Try running this script from the 'bin' directory of an installed Jython or setting %JYTHON_HOME.
    usage: jython [option] ... [-c cmd | -m mod | file | -] [arg] ...
    Try `jython -h' for more information.

My guess is that installer tried to use installed Jython for running ensurepip. At least pip wasn't installed correctly:

    C:\>jython -m pip
    Traceback (most recent call last):
      File "C:\jython2.7rc3\Lib\runpy.py", line 151, in _run_module_as_main
        mod_name, loader, code, fname = _get_module_details(mod_name)
      File "C:\jython2.7rc3\Lib\runpy.py", line 151, in _run_module_as_main
        mod_name, loader, code, fname = _get_module_details(mod_name)
      File "C:\jython2.7rc3\Lib\runpy.py", line 104, in _get_module_details
        if loader.is_package(mod_name):
    AttributeError: 'org.python.core.JavaImporter' object has no attribute 'is_package'

Not sure was something else broken. Fixed the problem by unsetting JYTHON_HOME and reinstalling Jython.
msg9978 (view) Author: Jim Baker (zyasoft) Date: 2015-04-27.01:51:59
This should be documented in release notes. Spurious or incorrect environment variable settings are always going to be tough to deal with.

One possibility is for the installer to analyze such settings, if any.
History
Date User Action Args
2015-04-27 01:51:59zyasoftsetnosy: + zyasoft
messages: + msg9978
2015-04-26 20:04:56pekka.klarckcreate