From: David C. <dav...@gm...> - 2016-01-06 17:51:25
|
As the subject line indicates, I am unable to install Sphinx1.3.3 into Jython2.7.0. I am highly motivated to get this fixed. So, even if I can't get a complete solution, I welcome warmly even mere 'leads' on how to fix this myself. I am on bended knee before the Jython Wizards. My troubles seem related to this issue: * http://bugs.jython.org/issue2349 Here are some facts about the machine: $ uname -a Linux mystery 3.2.0-77-generic #112-Ubuntu SMP Tue Feb 10 15:22:22 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux And, here is the procedure I am using, along with (most of) the output. * Notice the IOException that occurs during the installation of Jython. * Also notice t he AttributeError that occurs just before the installation of Sphinx terminates Here we go: $ export JAVA_HOME=/usr/local/jdk1.8.0_66 $ export PATH=$JAVA_HOME/bin:$PATH $ java -jar jython-installer-2.7.0.jar -s -d jython2.7.0 Performing silent installation 10 % 20 % 30 % 40 % 50 % 60 % 70 % Generating start scripts ... Installing pip and setuptools 90 % java.io.IOException: Cannot run program "jython2.7.0/bin/jython" (in directory "jython2.7.0/bin"): error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at org.python.util.install.ChildProcess.run(ChildProcess.java:272) at org.python.util.install.JarInstaller.ensurepip(JarInstaller.java:187) at org.python.util.install.JarInstaller.inflate(JarInstaller.java:152) at org.python.util.install.ConsoleInstaller.install(ConsoleInstaller.java:66) at org.python.util.install.Installation.internalMain(Installation.java:389) at org.python.util.install.Installation.main(Installation.java:43) Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:248) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 6 more 100 % Congratulations! You successfully installed Jython 2.7.0 to directory /home/c11319/jython2.7.0. $ export JYTHON_HOME=`pwd`/jython2.7.0 $ cd Sphinx-1.3.3 $ JYTHON_HOME/bin/jython setup.py install ......................... ...lots of output here... ......................... Installing easy_install script to /home/c11319/jython2.7.0/bin Traceback (most recent call last): File "setup.py", line 173, in <module> setup( File "/home/c11319/jython2.7.0/Lib/distutils/core.py", line 152, in setup dist.run_commands() File "/home/c11319/jython2.7.0/Lib/distutils/core.py", line 152, in setup dist.run_commands() File "/home/c11319/jython2.7.0/Lib/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/home/c11319/jython2.7.0/Lib/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/home/c11319/Sphinx-1.3.3/setuptools-7.0-py2.7.egg/setuptools/command/install.py", line 67, in run File "/home/c11319/Sphinx-1.3.3/setuptools-7.0-py2.7.egg/setuptools/command/install.py", line 117, in do_egg_install File "/home/c11319/Sphinx-1.3.3/setuptools-7.0-py2.7.egg/setuptools/command/easy_install.py", line 370, in run File "/home/c11319/Sphinx-1.3.3/setuptools-7.0-py2.7.egg/setuptools/command/easy_install.py", line 594, in easy_install File "/home/c11319/Sphinx-1.3.3/setuptools-7.0-py2.7.egg/setuptools/command/easy_install.py", line 645, in install_item File "/home/c11319/Sphinx-1.3.3/setuptools-7.0-py2.7.egg/setuptools/command/easy_install.py", line 670, in process_distribution File "/home/c11319/Sphinx-1.3.3/setuptools-7.0-py2.7.egg/setuptools/command/easy_install.py", line 548, in install_egg_scripts File "/home/c11319/Sphinx-1.3.3/setuptools-7.0-py2.7.egg/setuptools/command/easy_install.py", line 747, in install_wrapper_scripts File "/home/c11319/Sphinx-1.3.3/setuptools-7.0-py2.7.egg/setuptools/command/easy_install.py", line 783, in write_script File "/home/c11319/Sphinx-1.3.3/setuptools-7.0-py2.7.egg/setuptools/command/easy_install.py", line 2099, in current_umask AttributeError: 'module' object has no attribute 'umask' Many thanks, David |
From: Quanah Gibson-M. <qu...@zi...> - 2016-01-06 18:01:47
|
--On Wednesday, January 06, 2016 10:51 AM -0700 David Charles <dav...@gm...> wrote: > > > As the subject line indicates, I am unable to install Sphinx1.3.3 into > Jython2.7.0. I am highly motivated to get this fixed. So, even if I > can't get a complete solution, I welcome warmly even mere 'leads' on how > to fix this myself. I am on bended knee before the Jython Wizards. > > My troubles seem related to this issue: > > * http://bugs.jython.org/issue2349 > > Here are some facts about the machine: Have you used jython-2.7.1 beta 2 or later? See also <http://bugs.jython.org/issue2405> --Quanah -- Quanah Gibson-Mount Platform Architect Zimbra, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration |
From: David C. <dav...@gm...> - 2016-01-06 19:45:56
|
I just tried it. Jython2.7.1b2+Sphinx-1.3.3 appears to fail in precisely the same ways. David On Wed, Jan 6, 2016 at 11:01 AM, Quanah Gibson-Mount <qu...@zi...> wrote: > --On Wednesday, January 06, 2016 10:51 AM -0700 David Charles < > dav...@gm...> wrote: > > >> >> As the subject line indicates, I am unable to install Sphinx1.3.3 into >> Jython2.7.0. I am highly motivated to get this fixed. So, even if I >> can't get a complete solution, I welcome warmly even mere 'leads' on how >> to fix this myself. I am on bended knee before the Jython Wizards. >> >> My troubles seem related to this issue: >> >> * http://bugs.jython.org/issue2349 >> >> Here are some facts about the machine: >> > > Have you used jython-2.7.1 beta 2 or later? See also < > http://bugs.jython.org/issue2405> > > --Quanah > > -- > > Quanah Gibson-Mount > Platform Architect > Zimbra, Inc. > -------------------- > Zimbra :: the leader in open source messaging and collaboration > |
From: Quanah Gibson-M. <qu...@zi...> - 2016-01-06 20:04:06
|
--On Wednesday, January 06, 2016 12:45 PM -0700 David Charles <dav...@gm...> wrote: > > > I just tried it. Jython2.7.1b2+Sphinx-1.3.3 appears to fail in > precisely the same ways. Damn, it was worth a shot. :/ I notice the original bug <http://bugs.jython.org/issue2349> notes other env variables may require being set outside of JAVA_HOME (comment#4). Have you looked at setting them in addition to JAVA_HOME? --Quanah -- Quanah Gibson-Mount Platform Architect Zimbra, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration |
From: David C. <dav...@gm...> - 2016-01-06 21:25:46
|
I have made a little progress: The IOException goes away if I pass a full, absolute path to -d Next problem, my installation of Jython 2.7.1b2 fails with a different error: $ java -jar jython-installer-2.7.1b2.jar -s -d $JYTHON_HOME Performing silent installation 10 % 20 % 30 % 40 % 50 % 60 % 70 % Generating start scripts ... Installing pip and setuptools 90 % ...lots of output... [Loaded jnr.posix.JavaPasswd from file:/home/me/jython2.7.1b2/jython.jar] Traceback (most recent call last): File "/home/c11319/jython2.7.1b2/Lib/runpy.py", line 161, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/c11319/jython2.7.1b2/Lib/runpy.py", line 72, in _run_code exec code in run_globals File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__main__.py", line 4, in <module> ensurepip._main() File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 220, in _main bootstrap( File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 123, in bootstrap _run_pip(args + [p[0] for p in _PROJECTS], additional_paths) File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 45, in _run_pip import pip File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/__init__.py", line 10, in <module> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/util.py", line 17, in <module> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", line 109, in <module> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", line 71, in _get_build_prefix File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", line 66, in __get_username File "/home/c11319/jython2.7.1b2/Lib/pwd.py", line 60, in getpwuid return struct_passwd(entry) File "/home/c11319/jython2.7.1b2/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.1b2 to directory /home/c11319/jython2.7.1b2. This appears to be the same issue reported here: * http://bugs.jython.org/issue2333 Try as I might, I cannot get past this. Moreover, I do not understand the error, as I do not see any attempt to access passwd.pw_passwd in the offending line (pwd.py:36). Perhaps that is a clue? This is my environment: $ export | grep -e JAVA -e JYTHON declare -x JAVA_ENCODING="UTF-8" declare -x JAVA_HOME="/usr/local/jdk1.8.0_66" declare -x JAVA_MEM="512m" declare -x JAVA_OPTS="-verbose" declare -x JAVA_STACK="-Xss1024k" declare -x JYTHON_HOME="/home/me/jython2.7.1b2" declare -x JYTHON_OPTS="-v" As an aside: I thought it strange that I had to put '-Xss' into JAVA_STACK, but I did not have to put '-Xmx' into JAVA_MEM. Without the '-Xss' prefix in JAVA_STACK, my 1024k was interpreted to be a main class. David On Wed, Jan 6, 2016 at 1:03 PM, Quanah Gibson-Mount <qu...@zi...> wrote: > --On Wednesday, January 06, 2016 12:45 PM -0700 David Charles < > dav...@gm...> wrote: > > >> >> I just tried it. Jython2.7.1b2+Sphinx-1.3.3 appears to fail in >> precisely the same ways. >> > > Damn, it was worth a shot. :/ > > I notice the original bug <http://bugs.jython.org/issue2349> notes other > env variables may require being set outside of JAVA_HOME (comment#4). Have > you looked at setting them in addition to JAVA_HOME? > > > --Quanah > > > -- > > Quanah Gibson-Mount > Platform Architect > Zimbra, Inc. > -------------------- > Zimbra :: the leader in open source messaging and collaboration > |
From: Jim B. <jim...@py...> - 2016-01-11 23:51:26
|
David, First, it works for me, running against 2.7.1 master. So let's see what we have here. I think you have two separate issues: 1. Installing Jython, with pip support. We have been making progress on updating various aspects of Jython 2.7.1 master so that it supports latest pip/setuptools. (Although I think it would work with 2.7.0 final.) But to me, your problems look more of an issue with the Jython installer (see http://bugs.jython.org/issue2346). I would check the following $JAVA_HOME/bin/java -version If that test above doesn't work, you have a JAVA_HOME set so that it does NOT works with Jython 2.7. ( FWIW, unsetting JAVA_HOME usually is the easiest choice.) 2. Using Sphinx. We have some broken unit tests in Sphinx ( http://bugs.jython.org/issue2288), but I don't think these really matter for Sphinx users; instead they are more useful for Jython developers to identify good edge cases. So for my realistic test case, I tried running Sphinx on Jython against the source of the Jython book, https://github.com/jython/book. After setting up a minimal conf.py, that worked just fine. (Note we will still need to translate some of the directives in the concurrency chapter I wrote, but that also occurs with http://jython.readthedocs.org/en/latest/, which probably uses CPython to run Sphinx.) - Jim On Wed, Jan 6, 2016 at 2:25 PM, David Charles <dav...@gm...> wrote: > I have made a little progress: The IOException goes away if I pass a full, > absolute path to -d > > Next problem, my installation of Jython 2.7.1b2 fails with a different > error: > > $ java -jar jython-installer-2.7.1b2.jar -s -d $JYTHON_HOME > Performing silent installation > 10 % > 20 % > 30 % > 40 % > 50 % > 60 % > 70 % > Generating start scripts ... > Installing pip and setuptools > 90 % > ...lots of output... > [Loaded jnr.posix.JavaPasswd from file:/home/me/jython2.7.1b2/jython.jar] > Traceback (most recent call last): > File "/home/c11319/jython2.7.1b2/Lib/runpy.py", line 161, in > _run_module_as_main > return _run_code(code, main_globals, None, > File "/home/c11319/jython2.7.1b2/Lib/runpy.py", line 72, in _run_code > exec code in run_globals > File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__main__.py", line 4, in > <module> > ensurepip._main() > File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 220, > in _main > bootstrap( > File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 123, > in bootstrap > _run_pip(args + [p[0] for p in _PROJECTS], additional_paths) > File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 45, in > _run_pip > import pip > File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/__init__.py", line > 10, in <module> > File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/util.py", line 17, > in <module> > File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", > line 109, in <module> > File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", > line 71, in _get_build_prefix > File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", > line 66, in __get_username > File "/home/c11319/jython2.7.1b2/Lib/pwd.py", line 60, in getpwuid > return struct_passwd(entry) > File "/home/c11319/jython2.7.1b2/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.1b2 to directory > /home/c11319/jython2.7.1b2. > > This appears to be the same issue reported here: > > * http://bugs.jython.org/issue2333 > > Try as I might, I cannot get past this. Moreover, I do not understand the > error, as I do not see any attempt to access passwd.pw_passwd in the > offending line (pwd.py:36). Perhaps that is a clue? > > This is my environment: > > $ export | grep -e JAVA -e JYTHON > declare -x JAVA_ENCODING="UTF-8" > declare -x JAVA_HOME="/usr/local/jdk1.8.0_66" > declare -x JAVA_MEM="512m" > declare -x JAVA_OPTS="-verbose" > declare -x JAVA_STACK="-Xss1024k" > declare -x JYTHON_HOME="/home/me/jython2.7.1b2" > declare -x JYTHON_OPTS="-v" > > As an aside: I thought it strange that I had to put '-Xss' into > JAVA_STACK, but I did not have to put '-Xmx' into JAVA_MEM. Without the > '-Xss' prefix in JAVA_STACK, my 1024k was interpreted to be a main class. > > David > > > On Wed, Jan 6, 2016 at 1:03 PM, Quanah Gibson-Mount <qu...@zi...> > wrote: > >> --On Wednesday, January 06, 2016 12:45 PM -0700 David Charles < >> dav...@gm...> wrote: >> >> >>> >>> I just tried it. Jython2.7.1b2+Sphinx-1.3.3 appears to fail in >>> precisely the same ways. >>> >> >> Damn, it was worth a shot. :/ >> >> I notice the original bug <http://bugs.jython.org/issue2349> notes other >> env variables may require being set outside of JAVA_HOME (comment#4). Have >> you looked at setting them in addition to JAVA_HOME? >> >> >> --Quanah >> >> >> -- >> >> Quanah Gibson-Mount >> Platform Architect >> Zimbra, Inc. >> -------------------- >> Zimbra :: the leader in open source messaging and collaboration >> > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > > |
From: David C. <dav...@gm...> - 2016-01-12 15:03:32
|
Jim, Thanks for commenting. It works for me too *on my laptop*. It does not work for me on *the virtual machine provided by my employer*, which I now see is 'Ubuntu 12.04.5 LTS (GNU/Linux 3.2.0-77-generic x86_64)'. Perhaps I should upgrade that (virtual) box to 14.04.2 LTS before bothering this list any further. Just in case it is useful, here are the results of my attempts to install several different versions of Jython that I just happened to have laying around on the virtual machine: ./installjython jython-installer-2.7.0.jar $HOME/jython2.7.0 # FAIL: passwd.pw_passwd ./installjython jython-installer-2.7.1b1.jar $HOME/jython2.7.1b1 # FAIL: passwd.pw_passwd ./installjython jython-installer-2.7.1b2.jar $HOME/jython2.7.1b2 # FAIL: passwd.pw_passwd ./installjython jython-installer-2.7-b2.jar $HOME/jython2.7b2 # PASS ./installjython jython-installer-2.7-b4.jar $HOME/jython2.7b4 # PASS And, here are the results of my attempts to install Sphinx into each of the previous attempted installations. ./installsphinx $HOME/jython2.7.0 # FAIL: umask ./installsphinx $HOME/jython2.7.1b1 # FAIL: umask ./installsphinx $HOME/jython2.7.1b2 # FAIL: umask ./installsphinx $HOME/jython2.7b2 # FAIL: CERT_REQUIRED ./installsphinx $HOME/jython2.7b4 # FAIL: umask $JAVA_HOME/bin/java -version responds as expected. I did not try unsetting JAVA_HOME, as /usr/bin/java is version 1.6.0_34. Thanks again, David On Mon, Jan 11, 2016 at 4:50 PM, Jim Baker <jim...@py...> wrote: > David, > > First, it works for me, running against 2.7.1 master. So let's see what we > have here. I think you have two separate issues: > > 1. Installing Jython, with pip support. We have been making progress on > updating various aspects of Jython 2.7.1 master so that it supports latest > pip/setuptools. (Although I think it would work with 2.7.0 final.) But to > me, your problems look more of an issue with the Jython installer (see > http://bugs.jython.org/issue2346). I would check the following > > $JAVA_HOME/bin/java -version > > If that test above doesn't work, you have a JAVA_HOME set so that it does > NOT works with Jython 2.7. ( FWIW, unsetting JAVA_HOME usually is the > easiest choice.) > > 2. Using Sphinx. We have some broken unit tests in Sphinx ( > http://bugs.jython.org/issue2288), but I don't think these really matter > for Sphinx users; instead they are more useful for Jython developers to > identify good edge cases. > > So for my realistic test case, I tried running Sphinx on Jython against > the source of the Jython book, https://github.com/jython/book. After > setting up a minimal conf.py, that worked just fine. (Note we will still > need to translate some of the directives in the concurrency chapter I > wrote, but that also occurs with http://jython.readthedocs.org/en/latest/, > which probably uses CPython to run Sphinx.) > > - JimI have JAVA_HOME pointing > > On Wed, Jan 6, 2016 at 2:25 PM, David Charles <dav...@gm...> > wrote: > >> I have made a little progress: The IOException goes away if I pass a >> full, absolute path to -d >> >> Next problem, my installation of Jython 2.7.1b2 fails with a different >> error: >> >> $ java -jar jython-installer-2.7.1b2.jar -s -d $JYTHON_HOME >> Performing silent installation >> 10 % >> 20 % >> 30 % >> 40 % >> 50 % >> 60 % >> 70 % >> Generating start scripts ... >> Installing pip and setuptools >> 90 % >> ...lots of output... >> [Loaded jnr.posix.JavaPasswd from file:/home/me/jython2.7.1b2/jython.jar] >> Traceback (most recent call last): >> File "/home/c11319/jython2.7.1b2/Lib/runpy.py", line 161, in >> _run_module_as_main >> return _run_code(code, main_globals, None,I have JAVA_HOME pointing >> File "/home/c11319/jython2.7.1b2/Lib/runpy.py", line 72, in _run_code >> exec code in run_globals >> File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__main__.py", line 4, in >> <module> >> ensurepip._main() >> File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 220, >> in _main >> bootstrap( >> File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 123, >> in bootstrap >> _run_pip(args + [p[0] for p in _PROJECTS], additional_paths) >> File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 45, >> in _run_pip >> import pip >> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/__init__.py", >> line 10, in <module> >> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/util.py", line >> 17, in <module> >> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", >> line 109, in <module> >> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", >> line 71, in _get_build_prefix >> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", >> line 66, in __get_username >> File "/home/c11319/jython2.7.1b2/Lib/pwd.py", line 60, in getpwuid >> return struct_passwd(entry) >> File "/home/c11319/jython2.7.1b2/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.1b2 to directory >> /home/c11319/jython2.7.1b2. >> >> This appears to be the same issue reported here: >> >> * http://bugs.jython.org/issue2333 >> >> Try as I might, I cannot get past this. Moreover, I do not understand >> the error, as I do not see any attempt to access passwd.pw_passwd in the >> offending line (pwd.py:36). Perhaps that is a clue? >> >> This is my environment: >> >> $ export | grep -e JAVA -e JYTHON >> declare -x JAVA_ENCODING="UTF-8" >> declare -x JAVA_HOME="/usr/local/jdk1.8.0_66" >> declare -x JAVA_MEM="512m" >> declare -x JAVA_OPTS="-verbose" >> declare -x JAVA_STACK="-Xss1024k" >> declare -x JYTHON_HOME="/home/me/jython2.7.1b2" >> declare -x JYTHON_OPTS="-v" >> >> As an aside: I thought it strange that I had to put '-Xss' into >> JAVA_STACK, but I did not have to put '-Xmx' into JAVA_MEM. Without the >> '-Xss' prefix in JAVA_STACK, my 1024k was interpreted to be a main class. >> >> David >> >> >> On Wed, Jan 6, 2016 at 1:03 PM, Quanah Gibson-Mount <qu...@zi...> >> wrote: >> >>> --On Wednesday, January 06, 2016 12:45 PM -0700 David Charles < >>> dav...@gm...> wrote: >>> >>> >>>> >>>> I just tried it. Jython2.7.1b2+Sphinx-1.3.3 appears to fail in >>>> precisely the same ways. >>>> >>> >>> Damn, it was worth a shot. :/ >>> >>> I notice the original bug <http://bugs.jython.org/issue2349> notes >>> other env variables may require being set outside of JAVA_HOME >>> (comment#4). Have you looked at setting them in addition to JAVA_HOME? >>> >>> >>> --Quanah >>> >>> >>> -- >>> >>> Quanah Gibson-Mount >>> Platform Architect >>> Zimbra, Inc. >>> -------------------- >>> Zimbra :: the leader in open source messaging and collaboration >>> >> >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Jython-users mailing list >> Jyt...@li... >> https://lists.sourceforge.net/lists/listinfo/jython-users >> >> > |
From: David C. <dav...@gm...> - 2016-02-23 18:16:22
|
Here I am, reporting back as I now have *working* Sphinx documentation for my Jython+JavaFX project! Thank you for your support. The root issue seems to have been the OS. I upgraded the server from Ubuntu 12.04.5 to Ubuntu 14.04.4 and was able to install Jython 2.7.0 without the 'passwd.pw_passwd' exception. After the fact, I discovered that I was using this java: $ java -version java version "1.7.0_95" OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.14.04.1) OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode) And that the JAVA_HOME environment variable was unset. I was able to install Sphinx1.3.3 into this Jython instance and generate my documentation after overcoming only a few additional obstacles. 1. os.makedirs() failed for me. I replaced the default implementation of os.makedirs() in $JYTHON_HOME/Lib/os.py with this and was able to keep moving: import java.io.File return java.io.File(name).mkdirs() My own failure of os.makedirs() looked exactly like this issue: http://bugs.jython.org/issue1885 2. To get my JavaFX-dependent modules to import, I had to do some hackery on the headless server to ensure that the JavaFX runtime was already running, and running in headless mode with Monocle. (But, that has nothing to do with Jython.) Thanks again for your support and for the great platform that is Jython. This story has a happy ending. David On Tue, Jan 12, 2016 at 8:03 AM, David Charles <dav...@gm...> wrote: > Jim, > > Thanks for commenting. It works for me too *on my laptop*. It does not > work for me on *the virtual machine provided by my employer*, which I now > see is 'Ubuntu 12.04.5 LTS (GNU/Linux 3.2.0-77-generic x86_64)'. > > Perhaps I should upgrade that (virtual) box to 14.04.2 LTS before > bothering this list any further. > > Just in case it is useful, here are the results of my attempts to install > several different versions of Jython that I just happened to have laying > around on the virtual machine: > > ./installjython jython-installer-2.7.0.jar $HOME/jython2.7.0 # FAIL: > passwd.pw_passwd > ./installjython jython-installer-2.7.1b1.jar $HOME/jython2.7.1b1 # FAIL: > passwd.pw_passwd > ./installjython jython-installer-2.7.1b2.jar $HOME/jython2.7.1b2 # FAIL: > passwd.pw_passwd > ./installjython jython-installer-2.7-b2.jar $HOME/jython2.7b2 # PASS > ./installjython jython-installer-2.7-b4.jar $HOME/jython2.7b4 # PASS > > And, here are the results of my attempts to install Sphinx into each of > the previous attempted installations. > > ./installsphinx $HOME/jython2.7.0 # FAIL: umask > ./installsphinx $HOME/jython2.7.1b1 # FAIL: umask > ./installsphinx $HOME/jython2.7.1b2 # FAIL: umask > ./installsphinx $HOME/jython2.7b2 # FAIL: CERT_REQUIRED > ./installsphinx $HOME/jython2.7b4 # FAIL: umask > > $JAVA_HOME/bin/java -version responds as expected. I did not try > unsetting JAVA_HOME, as /usr/bin/java is version 1.6.0_34. > > Thanks again, > David > > > On Mon, Jan 11, 2016 at 4:50 PM, Jim Baker <jim...@py...> wrote: > >> David, >> >> First, it works for me, running against 2.7.1 master. So let's see what >> we have here. I think you have two separate issues: >> >> 1. Installing Jython, with pip support. We have been making progress on >> updating various aspects of Jython 2.7.1 master so that it supports latest >> pip/setuptools. (Although I think it would work with 2.7.0 final.) But to >> me, your problems look more of an issue with the Jython installer (see >> http://bugs.jython.org/issue2346). I would check the following >> >> $JAVA_HOME/bin/java -version >> >> If that test above doesn't work, you have a JAVA_HOME set so that it does >> NOT works with Jython 2.7. ( FWIW, unsetting JAVA_HOME usually is the >> easiest choice.) >> >> 2. Using Sphinx. We have some broken unit tests in Sphinx ( >> http://bugs.jython.org/issue2288), but I don't think these really matter >> for Sphinx users; instead they are more useful for Jython developers to >> identify good edge cases. >> >> So for my realistic test case, I tried running Sphinx on Jython against >> the source of the Jython book, https://github.com/jython/book. After >> setting up a minimal conf.py, that worked just fine. (Note we will still >> need to translate some of the directives in the concurrency chapter I >> wrote, but that also occurs with http://jython.readthedocs.org/en/latest/, >> which probably uses CPython to run Sphinx.) >> >> - JimI have JAVA_HOME pointing >> >> On Wed, Jan 6, 2016 at 2:25 PM, David Charles <dav...@gm... >> > wrote: >> >>> I have made a little progress: The IOException goes away if I pass a >>> full, absolute path to -d >>> >>> Next problem, my installation of Jython 2.7.1b2 fails with a different >>> error: >>> >>> $ java -jar jython-installer-2.7.1b2.jar -s -d $JYTHON_HOME >>> Performing silent installation >>> 10 % >>> 20 % >>> 30 % >>> 40 % >>> 50 % >>> 60 % >>> 70 % >>> Generating start scripts ... >>> Installing pip and setuptools >>> 90 % >>> ...lots of output... >>> [Loaded jnr.posix.JavaPasswd from file:/home/me/jython2.7.1b2/jython.jar] >>> Traceback (most recent call last): >>> File "/home/c11319/jython2.7.1b2/Lib/runpy.py", line 161, in >>> _run_module_as_main >>> return _run_code(code, main_globals, None,I have JAVA_HOME pointing >>> File "/home/c11319/jython2.7.1b2/Lib/runpy.py", line 72, in _run_code >>> exec code in run_globals >>> File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__main__.py", line 4, >>> in <module> >>> ensurepip._main() >>> File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 220, >>> in _main >>> bootstrap( >>> File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 123, >>> in bootstrap >>> _run_pip(args + [p[0] for p in _PROJECTS], additional_paths) >>> File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 45, >>> in _run_pip >>> import pip >>> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/__init__.py", >>> line 10, in <module> >>> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/util.py", line >>> 17, in <module> >>> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", >>> line 109, in <module> >>> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", >>> line 71, in _get_build_prefix >>> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", >>> line 66, in __get_username >>> File "/home/c11319/jython2.7.1b2/Lib/pwd.py", line 60, in getpwuid >>> return struct_passwd(entry) >>> File "/home/c11319/jython2.7.1b2/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.1b2 to directory >>> /home/c11319/jython2.7.1b2. >>> >>> This appears to be the same issue reported here: >>> >>> * http://bugs.jython.org/issue2333 >>> >>> Try as I might, I cannot get past this. Moreover, I do not understand >>> the error, as I do not see any attempt to access passwd.pw_passwd in the >>> offending line (pwd.py:36). Perhaps that is a clue? >>> >>> This is my environment: >>> >>> $ export | grep -e JAVA -e JYTHON >>> declare -x JAVA_ENCODING="UTF-8" >>> declare -x JAVA_HOME="/usr/local/jdk1.8.0_66" >>> declare -x JAVA_MEM="512m" >>> declare -x JAVA_OPTS="-verbose" >>> declare -x JAVA_STACK="-Xss1024k" >>> declare -x JYTHON_HOME="/home/me/jython2.7.1b2" >>> declare -x JYTHON_OPTS="-v" >>> >>> As an aside: I thought it strange that I had to put '-Xss' into >>> JAVA_STACK, but I did not have to put '-Xmx' into JAVA_MEM. Without the >>> '-Xss' prefix in JAVA_STACK, my 1024k was interpreted to be a main class. >>> >>> David >>> >>> >>> On Wed, Jan 6, 2016 at 1:03 PM, Quanah Gibson-Mount <qu...@zi...> >>> wrote: >>> >>>> --On Wednesday, January 06, 2016 12:45 PM -0700 David Charles < >>>> dav...@gm...> wrote: >>>> >>>> >>>>> >>>>> I just tried it. Jython2.7.1b2+Sphinx-1.3.3 appears to fail in >>>>> precisely the same ways. >>>>> >>>> >>>> Damn, it was worth a shot. :/ >>>> >>>> I notice the original bug <http://bugs.jython.org/issue2349> notes >>>> other env variables may require being set outside of JAVA_HOME >>>> (comment#4). Have you looked at setting them in addition to JAVA_HOME? >>>> >>>> >>>> --Quanah >>>> >>>> >>>> -- >>>> >>>> Quanah Gibson-Mount >>>> Platform Architect >>>> Zimbra, Inc. >>>> -------------------- >>>> Zimbra :: the leader in open source messaging and collaboration >>>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Jython-users mailing list >>> Jyt...@li... >>> https://lists.sourceforge.net/lists/listinfo/jython-users >>> >>> >> > |
From: Jim B. <jim...@py...> - 2016-02-24 01:16:53
|
David, Thanks for this experience report! It's great to hear that Sphinx works without problems for you, once you applied the workaround you found. We still want to fix the failing Sphinx tests (see http://bugs.jython.org/issue2288), but I suspect these are edge cases for Python compatibility at this point for Jython. re os.makedirs - in general, I have found the Java-based solution found as part of Java 7 is very robust (especially on Windows). The one change I would make in your solution is to use https://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#createDirectories(java.nio.file.Path,%20java.nio.file.attribute.FileAttribute...), so you can get the mode set. Making this be the default implementation in the os module makes sense to me. Lastly, it would be great if you could submit a bug report, including traceback, etc, so we can trap the error you are seeing and turn it into an appropriate OSError, with errno properly set. - Jim On Tue, Feb 23, 2016 at 11:16 AM, David Charles <dav...@gm...> wrote: > Here I am, reporting back as I now have *working* Sphinx documentation for > my Jython+JavaFX project! Thank you for your support. > > The root issue seems to have been the OS. I upgraded the server from > Ubuntu 12.04.5 to Ubuntu 14.04.4 and was able to install Jython 2.7.0 > without the 'passwd.pw_passwd' exception. > > After the fact, I discovered that I was using this java: > > $ java -version > java version "1.7.0_95" > OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.14.04.1) > OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode) > > And that the JAVA_HOME environment variable was unset. > > I was able to install Sphinx1.3.3 into this Jython instance and generate > my documentation after overcoming only a few additional obstacles. > > 1. os.makedirs() failed for me. I replaced the default implementation of > os.makedirs() in $JYTHON_HOME/Lib/os.py with this and was able to keep > moving: > > import java.io.File > return java.io.File(name).mkdirs() > > My own failure of os.makedirs() looked exactly like this issue: > http://bugs.jython.org/issue1885 > > 2. To get my JavaFX-dependent modules to import, I had to do some hackery > on the headless server to ensure that the JavaFX runtime was already > running, and running in headless mode with Monocle. (But, that has nothing > to do with Jython.) > > Thanks again for your support and for the great platform that is Jython. > This story has a happy ending. > > David > > > On Tue, Jan 12, 2016 at 8:03 AM, David Charles <dav...@gm... > > wrote: > >> Jim, >> >> Thanks for commenting. It works for me too *on my laptop*. It does not >> work for me on *the virtual machine provided by my employer*, which I now >> see is 'Ubuntu 12.04.5 LTS (GNU/Linux 3.2.0-77-generic x86_64)'. >> >> Perhaps I should upgrade that (virtual) box to 14.04.2 LTS before >> bothering this list any further. >> >> Just in case it is useful, here are the results of my attempts to install >> several different versions of Jython that I just happened to have laying >> around on the virtual machine: >> >> ./installjython jython-installer-2.7.0.jar $HOME/jython2.7.0 # FAIL: >> passwd.pw_passwd >> ./installjython jython-installer-2.7.1b1.jar $HOME/jython2.7.1b1 # FAIL: >> passwd.pw_passwd >> ./installjython jython-installer-2.7.1b2.jar $HOME/jython2.7.1b2 # FAIL: >> passwd.pw_passwd >> ./installjython jython-installer-2.7-b2.jar $HOME/jython2.7b2 # PASS >> ./installjython jython-installer-2.7-b4.jar $HOME/jython2.7b4 # PASS >> >> And, here are the results of my attempts to install Sphinx into each of >> the previous attempted installations. >> >> ./installsphinx $HOME/jython2.7.0 # FAIL: umask >> ./installsphinx $HOME/jython2.7.1b1 # FAIL: umask >> ./installsphinx $HOME/jython2.7.1b2 # FAIL: umask >> ./installsphinx $HOME/jython2.7b2 # FAIL: CERT_REQUIRED >> ./installsphinx $HOME/jython2.7b4 # FAIL: umask >> >> $JAVA_HOME/bin/java -version responds as expected. I did not try >> unsetting JAVA_HOME, as /usr/bin/java is version 1.6.0_34. >> >> Thanks again, >> David >> >> >> On Mon, Jan 11, 2016 at 4:50 PM, Jim Baker <jim...@py...> wrote: >> >>> David, >>> >>> First, it works for me, running against 2.7.1 master. So let's see what >>> we have here. I think you have two separate issues: >>> >>> 1. Installing Jython, with pip support. We have been making progress on >>> updating various aspects of Jython 2.7.1 master so that it supports latest >>> pip/setuptools. (Although I think it would work with 2.7.0 final.) But to >>> me, your problems look more of an issue with the Jython installer (see >>> http://bugs.jython.org/issue2346). I would check the following >>> >>> $JAVA_HOME/bin/java -version >>> >>> If that test above doesn't work, you have a JAVA_HOME set so that it >>> does NOT works with Jython 2.7. ( FWIW, unsetting JAVA_HOME usually is the >>> easiest choice.) >>> >>> 2. Using Sphinx. We have some broken unit tests in Sphinx ( >>> http://bugs.jython.org/issue2288), but I don't think these really >>> matter for Sphinx users; instead they are more useful for Jython developers >>> to identify good edge cases. >>> >>> So for my realistic test case, I tried running Sphinx on Jython against >>> the source of the Jython book, https://github.com/jython/book. After >>> setting up a minimal conf.py, that worked just fine. (Note we will still >>> need to translate some of the directives in the concurrency chapter I >>> wrote, but that also occurs with >>> http://jython.readthedocs.org/en/latest/, which probably uses CPython >>> to run Sphinx.) >>> >>> - JimI have JAVA_HOME pointing >>> >>> On Wed, Jan 6, 2016 at 2:25 PM, David Charles < >>> dav...@gm...> wrote: >>> >>>> I have made a little progress: The IOException goes away if I pass a >>>> full, absolute path to -d >>>> >>>> Next problem, my installation of Jython 2.7.1b2 fails with a different >>>> error: >>>> >>>> $ java -jar jython-installer-2.7.1b2.jar -s -d $JYTHON_HOME >>>> Performing silent installation >>>> 10 % >>>> 20 % >>>> 30 % >>>> 40 % >>>> 50 % >>>> 60 % >>>> 70 % >>>> Generating start scripts ... >>>> Installing pip and setuptools >>>> 90 % >>>> ...lots of output... >>>> [Loaded jnr.posix.JavaPasswd from >>>> file:/home/me/jython2.7.1b2/jython.jar] >>>> Traceback (most recent call last): >>>> File "/home/c11319/jython2.7.1b2/Lib/runpy.py", line 161, in >>>> _run_module_as_main >>>> return _run_code(code, main_globals, None,I have JAVA_HOME pointing >>>> File "/home/c11319/jython2.7.1b2/Lib/runpy.py", line 72, in _run_code >>>> exec code in run_globals >>>> File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__main__.py", line 4, >>>> in <module> >>>> ensurepip._main() >>>> File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line >>>> 220, in _main >>>> bootstrap( >>>> File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line >>>> 123, in bootstrap >>>> _run_pip(args + [p[0] for p in _PROJECTS], additional_paths) >>>> File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 45, >>>> in _run_pip >>>> import pip >>>> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/__init__.py", >>>> line 10, in <module> >>>> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/util.py", line >>>> 17, in <module> >>>> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", >>>> line 109, in <module> >>>> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", >>>> line 71, in _get_build_prefix >>>> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", >>>> line 66, in __get_username >>>> File "/home/c11319/jython2.7.1b2/Lib/pwd.py", line 60, in getpwuid >>>> return struct_passwd(entry) >>>> File "/home/c11319/jython2.7.1b2/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.1b2 to directory >>>> /home/c11319/jython2.7.1b2. >>>> >>>> This appears to be the same issue reported here: >>>> >>>> * http://bugs.jython.org/issue2333 >>>> >>>> Try as I might, I cannot get past this. Moreover, I do not understand >>>> the error, as I do not see any attempt to access passwd.pw_passwd in the >>>> offending line (pwd.py:36). Perhaps that is a clue? >>>> >>>> This is my environment: >>>> >>>> $ export | grep -e JAVA -e JYTHON >>>> declare -x JAVA_ENCODING="UTF-8" >>>> declare -x JAVA_HOME="/usr/local/jdk1.8.0_66" >>>> declare -x JAVA_MEM="512m" >>>> declare -x JAVA_OPTS="-verbose" >>>> declare -x JAVA_STACK="-Xss1024k" >>>> declare -x JYTHON_HOME="/home/me/jython2.7.1b2" >>>> declare -x JYTHON_OPTS="-v" >>>> >>>> As an aside: I thought it strange that I had to put '-Xss' into >>>> JAVA_STACK, but I did not have to put '-Xmx' into JAVA_MEM. Without the >>>> '-Xss' prefix in JAVA_STACK, my 1024k was interpreted to be a main class. >>>> >>>> David >>>> >>>> >>>> On Wed, Jan 6, 2016 at 1:03 PM, Quanah Gibson-Mount <qu...@zi...> >>>> wrote: >>>> >>>>> --On Wednesday, January 06, 2016 12:45 PM -0700 David Charles < >>>>> dav...@gm...> wrote: >>>>> >>>>> >>>>>> >>>>>> I just tried it. Jython2.7.1b2+Sphinx-1.3.3 appears to fail in >>>>>> precisely the same ways. >>>>>> >>>>> >>>>> Damn, it was worth a shot. :/ >>>>> >>>>> I notice the original bug <http://bugs.jython.org/issue2349> notes >>>>> other env variables may require being set outside of JAVA_HOME >>>>> (comment#4). Have you looked at setting them in addition to JAVA_HOME? >>>>> >>>>> >>>>> --Quanah >>>>> >>>>> >>>>> -- >>>>> >>>>> Quanah Gibson-Mount >>>>> Platform Architect >>>>> Zimbra, Inc. >>>>> -------------------- >>>>> Zimbra :: the leader in open source messaging and collaboration >>>>> >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> >>>> _______________________________________________ >>>> Jython-users mailing list >>>> Jyt...@li... >>>> https://lists.sourceforge.net/lists/listinfo/jython-users >>>> >>>> >>> >> > |