Issue2333

classification
Title: ensurepip passwd.pw_passwd unimplemented
Type: Severity: normal
Components: Versions: Jython 2.7
Milestone:
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: baztian, dckc, zyasoft
Priority: Keywords:

Created on 2015-04-19.08:42:37 by baztian, last changed 2015-06-10.21:39:53 by zyasoft.

Messages
msg9883 (view) Author: (baztian) Date: 2015-04-19.08:42:37
$ $HOME/Software/jython/bin/jython -m ensurepip
Traceback (most recent call last):
  File "/home/me/Software/jython-2.7-rc2/Lib/runpy.py", line 161, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/me/Software/jython-2.7-rc2/Lib/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/me/Software/jython-2.7-rc2/Lib/ensurepip/__main__.py", line 4, in <module>
    ensurepip._main()
  File "/home/me/Software/jython-2.7-rc2/Lib/ensurepip/__init__.py", line 220, in _main
    bootstrap(
  File "/home/me/Software/jython-2.7-rc2/Lib/ensurepip/__init__.py", line 123, in bootstrap
    _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
  File "/home/me/Software/jython-2.7-rc2/Lib/ensurepip/__init__.py", line 45, in _run_pip
    import pip
  File "/tmp/tmpmQhAG3/pip-1.6-py2.py3-none-any.whl/pip/__init__.py", line 10, in <module>
  File "/tmp/tmpmQhAG3/pip-1.6-py2.py3-none-any.whl/pip/util.py", line 17, in <module>
  File "/tmp/tmpmQhAG3/pip-1.6-py2.py3-none-any.whl/pip/locations.py", line 109, in <module>
  File "/tmp/tmpmQhAG3/pip-1.6-py2.py3-none-any.whl/pip/locations.py", line 71, in _get_build_prefix
  File "/tmp/tmpmQhAG3/pip-1.6-py2.py3-none-any.whl/pip/locations.py", line 66, in __get_username
  File "/home/me/Software/jython-2.7-rc2/Lib/pwd.py", line 60, in getpwuid
    return struct_passwd(entry)
  File "/home/me/Software/jython-2.7-rc2/Lib/pwd.py", line 36, in __new__
    pwd = (newStringOrUnicode(pwd.loginName), newStringOrUnicode(pwd.password), int(pwd.UID),
NotImplementedError: passwd.pw_passwd unimplemented
msg9885 (view) Author: Jim Baker (zyasoft) Date: 2015-04-19.13:31:37
With RC2, you no longer need to run ensurepip, since that's an installation choice you can select by running the installer itself, so -m ensurepip is more for people building from source and not using the installer. Also not all instllation options will support pip/setuptools, in particular not core (minimum install) or standalone.

Some questions:

What operating system are you running on, including version?
What is the language localization?
What is the version of Java?
What option did you choose for installation?
msg9888 (view) Author: (baztian) Date: 2015-04-19.15:58:16
What operating system are you running on, including version?
Ubuntu 14.04
What is the language localization?
$ echo $LANG
en_US.UTF-8
What is the version of Java?
Tried Oracle Java 7 and 8
What option did you choose for installation?
java -jar $VIRTUAL_ENV/javalib/jython-installer-2.7-rc2.jar -s -d $HOME/Software/jython-2.7-rc2
msg9893 (view) Author: Jim Baker (zyasoft) Date: 2015-04-19.21:33:22
Here's what I get with pretty much the same Ubuntu setup as you have:

$ java -jar dist/jython-installer.jar -s -d $HOME/Software/jython-2.7-rc2
Performing silent installation
 10 %
 20 %
 30 %
 40 %
 50 %
 60 %
 70 %
Generating start scripts ...
Installing pip and setuptools
 90 %
*sys-package-mgr*: processing new jar, '/home/jbaker/Software/jython-2.7-rc2/jython.jar'
*sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/resources.jar'
*sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/rt.jar'
*sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/jsse.jar'
*sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/jce.jar'
*sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/charsets.jar'
*sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/rhino.jar'
*sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/localedata.jar'
*sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/sunpkcs11.jar'
*sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/sunjce_provider.jar'
*sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/zipfs.jar'
*sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/java-atk-wrapper.jar'
*sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/icedtea-sound.jar'
*sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/dnsns.jar'
Ignoring indexes: https://pypi.python.org/simple/
Downloading/unpacking setuptools
Downloading/unpacking pip
Installing collected packages: setuptools, pip
Successfully installed setuptools pip
Cleaning up...
 100 %
Congratulations! You successfully installed Jython 2.7rc2+ to directory /home/jbaker/Software/jython-2.7-rc2.
jbaker@thought:~/jythondev/jython27$ cd ~/Software/jython-2.7-rc2/
jbaker@thought:~/Software/jython-2.7-rc2$ bin/jython -m ensurepip
Ignoring indexes: https://pypi.python.org/simple/
Requirement already satisfied (use --upgrade to upgrade): setuptools in ./Lib/site-packages
Requirement already satisfied (use --upgrade to upgrade): pip in ./Lib/site-packages
Cleaning up...

So no harm in trying to do the second ensurepip. Arguably it should say "Finished" as the last line, but that's a minor detail in ensurepip itself.

$ lsb_release -a
LSB Version:    core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 14.10
Release:        14.10
Codename:       utopic

$ java -version
java version "1.7.0_75"
OpenJDK Runtime Environment (IcedTea 2.5.4) (7u75-2.5.4-1~utopic1)
OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)

I also tried this with Oracle Java 7 and Java 8 with the same results.

So putting this in the "works for me" category, but we will see if anyone else can reproduce.
msg10100 (view) Author: Dan Connolly (dckc) Date: 2015-06-04.21:58:56
I'd like to see this re-opened. I'm seeing the same symptoms.

> java -jar jython-installer-2.7.0.jar --type standard --silent --directory /opt/jython
...
Installing pip and setuptools
 90 %
[INFO] Unable to bind key for unsupported operation: backward-delete-word
[INFO] Unable to bind key for unsupported operation: backward-delete-word
[INFO] Unable to bind key for unsupported operation: down-history
[INFO] Unable to bind key for unsupported operation: up-history
[INFO] Unable to bind key for unsupported operation: up-history
[INFO] Unable to bind key for unsupported operation: down-history
[INFO] Unable to bind key for unsupported operation: up-history
[INFO] Unable to bind key for unsupported operation: down-history
[INFO] Unable to bind key for unsupported operation: up-history
[INFO] Unable to bind key for unsupported operation: down-history
[INFO] Unable to bind key for unsupported operation: up-history
[INFO] Unable to bind key for unsupported operation: down-history
Traceback (most recent call last):
  File "/opt/jython/Lib/runpy.py", line 161, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/opt/jython/Lib/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/opt/jython/Lib/ensurepip/__main__.py", line 4, in <module>
    ensurepip._main()
  File "/opt/jython/Lib/ensurepip/__init__.py", line 220, in _main
    bootstrap(
  File "/opt/jython/Lib/ensurepip/__init__.py", line 123, in bootstrap
    _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
  File "/opt/jython/Lib/ensurepip/__init__.py", line 45, in _run_pip
    import pip
  File "/tmp/tmpIBC_DL/pip-1.6-py2.py3-none-any.whl/pip/__init__.py", line 10, in <module>
  File "/tmp/tmpIBC_DL/pip-1.6-py2.py3-none-any.whl/pip/util.py", line 17, in <module>
  File "/tmp/tmpIBC_DL/pip-1.6-py2.py3-none-any.whl/pip/locations.py", line 109, in <module>
  File "/tmp/tmpIBC_DL/pip-1.6-py2.py3-none-any.whl/pip/locations.py", line 71, in _get_build_prefix
  File "/tmp/tmpIBC_DL/pip-1.6-py2.py3-none-any.whl/pip/locations.py", line 66, in __get_username
  File "/opt/jython/Lib/pwd.py", line 60, in getpwuid
    return struct_passwd(entry)
  File "/opt/jython/Lib/pwd.py", line 36, in __new__
    pwd = (newStringOrUnicode(pwd.loginName), newStringOrUnicode(pwd.password), int(pwd.UID),
NotImplementedError: passwd.pw_passwd unimplemented
 100 %
Congratulations! You successfully installed Jython 2.7.0 to directory /opt/jython.


context:

> java -version
java version "1.7.0"
Java(TM) SE Runtime Environment (build pxa6470sr8fp10-20141219_01(SR8 FP10))
IBM J9 VM (build 2.6, JRE 1.7.0 Linux amd64-64 Compressed References 20141216_227497 (JIT enabled, AOT enabled)
J9VM - R26_Java726_SR8_20141216_0955_B227497
JIT  - r11.b07_20141003_74578.05
GC   - R26_Java726_SR8_20141216_0955_B227497_CMPRSS
J9CL - 20141216_227497)
JCL - 20141217_01 based on Oracle jdk7u75-b12

> cat /etc/SuSE-release 
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 3

> uname -a
Linux ... 3.0.101-0.47.52-default #1 SMP Thu Mar 26 10:55:49 UTC 2015 (0e3c7c8) x86_64 x86_64 x86_64 GNU/Linux
msg10103 (view) Author: Jim Baker (zyasoft) Date: 2015-06-05.04:44:25
Sure, we can re-open. So far all of these issues have been due to some bad, or at least unexpected, settings, usually environmental variables. See #2346

Might be related to output like

[INFO] Unable to bind key for unsupported operation: backward-delete-word

which is unexpected. Perhaps JLine2 is not also causing issues as well, and this is truly just informative. Start with https://github.com/sbt/sbt/issues/1796
msg10104 (view) Author: Dan Connolly (dckc) Date: 2015-06-05.17:50:51
indeed, we had more than one JDK on this machine. cleaning that up (along with unsetting JAVA_HOME) fixed it. So my issue was really #2346

I don't see how to close this, but it's resolved to my satisfaction. Thanks for the clues.
msg10111 (view) Author: Jim Baker (zyasoft) Date: 2015-06-10.21:39:53
Closing out per msg10104
History
Date User Action Args
2015-06-10 21:39:53zyasoftsetstatus: open -> closed
messages: + msg10111
2015-06-05 17:50:51dckcsetmessages: + msg10104
2015-06-05 04:44:26zyasoftsetstatus: closed -> open
messages: + msg10103
2015-06-04 21:58:57dckcsetnosy: + dckc
messages: + msg10100
2015-05-02 22:01:47zyasoftsetstatus: pending -> closed
2015-04-23 03:43:08zyasoftsetstatus: open -> pending
2015-04-19 21:33:22zyasoftsetresolution: works for me
messages: + msg9893
2015-04-19 15:58:16baztiansetmessages: + msg9888
2015-04-19 13:31:38zyasoftsetnosy: + zyasoft
messages: + msg9885
2015-04-19 08:42:37baztiancreate