question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pip fails to install on windows using jython 2.7.0 final

See original GitHub issue

Problem

The jython installer installs pip on request at installation time. This used to work, however, this stopped to work some time ago.

Reproduce

Fetch the jython installer over here:

http://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.7.0/jython-installer-2.7.0.jar

Then install using the “silent” install mode to a directory (`jythontest270’):

   C:> java -jar jython-installer-2.7.0.jar -s -d jythonpiptest270

The above command craps out with a traceback like:

Traceback (most recent call last):
  File "D:\nexiles\jython\Lib\runpy.py", line 161, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "D:\nexiles\jython\Lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "D:\nexiles\jython\Lib\ensurepip\__main__.py", line 4, in <module>
    ensurepip._main()
  File "D:\nexiles\jython\Lib\ensurepip\__init__.py", line 220, in _main
    bootstrap(
  File "D:\nexiles\jython\Lib\ensurepip\__init__.py", line 123, in bootstrap
    _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
  File "D:\nexiles\jython\Lib\ensurepip\__init__.py", line 45, in _run_pip
    import pip
  File "C:\Users\ADMINI~1\AppData\Local\Temp\1\tmpguetqs\pip-1.6-py2.py3-none-an
y.whl\pip\__init__.py", line 10, in <module>
  File "C:\Users\ADMINI~1\AppData\Local\Temp\1\tmpguetqs\pip-1.6-py2.py3-none-an
y.whl\pip\util.py", line 17, in <module>
  File "C:\Users\ADMINI~1\AppData\Local\Temp\1\tmpguetqs\pip-1.6-py2.py3-none-an
y.whl\pip\locations.py", line 109, in <module>
  File "C:\Users\ADMINI~1\AppData\Local\Temp\1\tmpguetqs\pip-1.6-py2.py3-none-an
y.whl\pip\locations.py", line 90, in _get_build_prefix
AttributeError: 'module' object has no attribute 'geteuid'

Jython Bug Tracker Issue

http://bugs.jython.org/issue2360

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:3
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

10reactions
memoselykcommented, Dec 2, 2015

I was having today the same problem, while installing jython. Jython installed correctly, but pip installation failed with the same error:

Installing pip and setuptools
90 %
Traceback (most recent call last):
  File "C:\jython2.7.0\Lib\runpy.py", line 161, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\jython2.7.0\Lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\jython2.7.0\Lib\ensurepip\__main__.py", line 4, in <module>
    ensurepip._main()
  File "C:\jython2.7.0\Lib\ensurepip\__init__.py", line 220, in _main
    bootstrap(
  File "C:\jython2.7.0\Lib\ensurepip\__init__.py", line 123, in bootstrap
    _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
  File "C:\jython2.7.0\Lib\ensurepip\__init__.py", line 45, in _run_pip
    import pip
  File "C:\Users\<user>\AppData\Local\Temp\tmpqzn7bu\pip-1.6-py2.py3-none-any.whl\pip\__init__.py", line 10, in <module>
  File "C:\Users\<user>\AppData\Local\Temp\tmpqzn7bu\pip-1.6-py2.py3-none-any.whl\pip\util.py", line 17, in <module>
  File "C:\Users\<user>\AppData\Local\Temp\tmpqzn7bu\pip-1.6-py2.py3-none-any.whl\pip\locations.py", line 109, in <module>
  File "C:\Users\<user>\AppData\Local\Temp\tmpqzn7bu\pip-1.6-py2.py3-none-any.whl\pip\locations.py", line 90, in _get_build_prefix
AttributeError: 'module' object has no attribute 'geteuid'
100 %
Congratulations! You successfully installed Jython 2.7.0 to directory C:\jython2.7.0.

I was able to get rid of that problem by removing the folder %TEMP%\pip_build_<user>.

Once I could install jython with pip, C:\jython\bin\pip.exe -V worked fine the first time, but the folder %TEMP%\pip_build_<user> was created and successive attempts to run the same command failed with the now familiar AttributeError: 'module' object has no attribute 'geteuid'.

1reaction
vqwcommented, Oct 21, 2016

@memoselyk please bold your workaround as it is not visible at first glance So after nearly a year problem exists and we are forced to use workarounds? 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

jython.exe "2.7.0 final release" failed execution on my ...
perfectly smooth installation, "pip install requests" worked fine. Must have been the Java path (I changed it a few days ago in connection...
Read more >
Issue 2360: Not installing pip on Jython
This used to work, I have a windows jython installation using the final package which HAS pip, upgrading that results in the same...
Read more >
Issue 2477: 2.7.1b3: pip broken on Windows - Jython tracker
After a fresh Jython 2.7.1 beta 3 installation with default settings on Windows 7 with Java 1.8.0_73 neither `jython -m pip` nor `pip`...
Read more >
Issue 2521: Windows installation (all) fails on Windows 10
Start installation with > java -jar jython-installer-2.7.0.jar --console 2. ... However, the installation does not contain pip or any other tools.
Read more >
Issue 2350: Installer errors on ensurepip - Jython tracker
Installing pip and setuptools 90 % java.io.IOException: Cannot run program "jython/bin/jython" (in directory "jython/bin"): error=20, Not a directory at java.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found