Description of problem: I'd like to test my sowtware with tox on Jython as well, but it doesn't work. Version-Release number of selected component (if applicable): jython-2.7-2.fc23.noarch How reproducible: Always 1. dnf install python-tox jython 2. create empty directory with tox.ini [tox] envlist = jython skipsdist = True 3. run `tox` Actual results: $ tox jython create: /home/churchyard/tmp/.tox/jython ERROR: InvocationError: Failed to get version_info for jython: could not decode '>>> \r>>> def pyinfo():\r\n... \r... import sys\r\n... \r... return dict(version_info=tuple(sys.version_info),\r\n... \r... sysplatform=sys.platform)\r\n... \r... \r\n>>> \r>>> print (pyinfo())' _____________________________________________________________________________________________________________ summary _____________________________________________________________________________________________________________ ERROR: jython: InvocationError: Failed to get version_info for jython: could not decode '>>> \r>>> def pyinfo():\r\n... \r... import sys\r\n... \r... return dict(version_info=tuple(sys.version_info),\r\n... \r... sysplatform=sys.platform)\r\n... \r... \r\n>>> \r>>> print (pyinfo())' Expected results: $ tox jython create: /home/churchyard/tmp/.tox/jython jython installed: ... jython runtests: PYTHONHASHSEED='...' _____________________________________________________________________________________________________________ summary _____________________________________________________________________________________________________________ jython: commands succeeded congratulations :) Additional info: Also try: python2 -m virtualenv --python /usr/bin/jython jython2 python3 -m virtualenv --python /usr/bin/jython jython3
$ virtualenv-3 --python /usr/bin/jython jjj Running virtualenv with interpreter /usr/bin/jython Cannot find file /usr/share/jython/Include (bad symlink) Cannot find file /usr/share/jython/cachedir (bad symlink) New jython executable in /home/churchyard/jjj/bin/jython:bin:jython Traceback (most recent call last): File "/usr/lib/python3.5/site-packages/virtualenv.py", line 2327, in <module> main() File "/usr/lib/python3.5/site-packages/virtualenv.py", line 701, in main create_environment(home_dir, File "/usr/lib/python3.5/site-packages/virtualenv.py", line 922, in create_environment py_executable = os.path.abspath(install_python( File "/usr/lib/python3.5/site-packages/virtualenv.py", line 1230, in install_python shutil.copyfile(executable, py_executable) File "/usr/share/jython/Lib/shutil.py", line 71, in copyfile for fn in [src, dst]: IOError: [Errno 2] No such file or directory: '/usr/share/jython:bin:jython'
This message is a reminder that Fedora 23 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 23. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '23'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 23 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
jython-2.7.1-0.2.b3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-169bb5a5e0
Please try the update mentioned above. I made a change to allow virtualenv to work with jython. For example: $ virtualenv-2 --python=jython jy_env Running virtualenv with interpreter /usr/bin/jython Cannot find file /usr/share/jython/Include (bad symlink) Cannot find file /usr/share/jython/cachedir (bad symlink) New jython executable in /home/mbooth/jy_env/bin/jython Installing setuptools, pip, wheel...done. $ source jy_env/bin/activate (jy_env) $ python Jython 2.7.1b3 (, Jan 26 2017, 12:11:24) [OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.8.0_121 Type "help", "copyright", "credits" or "license" for more information. >>> However I don't know why tox doesn't work. It seems to just pipe code into the interpreter to get version info, and this works just fine with jython from the command line, for example: $ cat <<EOF | jython import sys print(dict(version_info=tuple(sys.version_info),sysplatform=sys.platform)) EOF Jython 2.7.1b3 (, Jan 26 2017, 12:11:24) [OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.8.0_121 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> print(dict(version_info=tuple(sys.version_info),sysplatform=sys.platform)) {'version_info': (2, 7, 3, 'beta', 0), 'sysplatform': 'java1.8.0_121'} So I have no idea whether it is a problem with Tox or Jython.
virtualenv works, thanks! tox is still broken, seems related to http://bugs.jython.org/issue2325
jython-2.7.1-0.2.b3.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-169bb5a5e0
$ cat <<EOF | jython > jlog import sys print(dict(version_info=tuple(sys.version_info),sysplatform=sys.platform)) EOF Jython 2.7.1b3 (, Jan 26 2017, 12:52:10) [OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.8.0_111 Type "help", "copyright", "credits" or "license" for more information. $ cat <<EOF | python > plog import sys print(dict(version_info=tuple(sys.version_info),sysplatform=sys.platform)) EOF $ cat plog {'sysplatform': 'linux2', 'version_info': (2, 7, 12, 'final', 0)} $ cat jlog >>> import sys >>> print(dict(version_info=tuple(sys.version_info),sysplatform=sys.platform)) {'version_info': (2, 7, 3, 'beta', 0), 'sysplatform': 'java1.8.0_111'}
(In reply to Miro Hrončok from comment #5) > virtualenv works, thanks! > > tox is still broken, seems related to http://bugs.jython.org/issue2325 Hey, thanks for testing. I had not seem that bug, I will investigate further
jython-2.7.1-0.2.b3.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.
tox thing still an issue.
Hi, any news here? What can I do to help? (I have 0 experience with Jython :(, but I might try anyway.)
Sorry, I did not get chance to get back to this bug yet.
After "sleeping on it" for six months, I finally had a brain wave. Can you please try to see if this latest build of jython works for your use case? https://koji.fedoraproject.org/koji/buildinfo?buildID=954323
I've tryied to use what's described here https://developer.fedoraproject.org/tech/languages/python/multiple-pythons.html (Getting it and running it all with tox) With: envlist = py27,py35,py36,pypy,pypy3,jython This is before the change: $ tox ... jython create: /home/churchyard/tmp/jytox/.tox/jython ERROR: InvocationError: Failed to get version_info for jython: could not decode b'>>> \r>>> def pyinfo():\r\n... \r... import sys\r\n... \r... return dict(version_info=tuple(sys.version_info),\r\n... \r... sysplatform=sys.platform)\r\n... \r... \r\n>>> \r>>> print(pyinfo())' ____________________________________________________ summary ____________________________________________________ py27: commands succeeded py35: commands succeeded py36: commands succeeded pypy: commands succeeded pypy3: commands succeeded ERROR: jython: InvocationError: Failed to get version_info for jython: could not decode b'>>> \r>>> def pyinfo():\r\n... \r... import sys\r\n... \r... return dict(version_info=tuple(sys.version_info),\r\n... \r... sysplatform=sys.platform)\r\n... \r... \r\n>>> \r>>> print(pyinfo())' This is with that build: $ tox ... jython create: /home/churchyard/tmp/jytox/.tox/jython WARNING:test command found but not installed in testenv cmd: /usr/bin/pip env: /home/churchyard/tmp/jytox/.tox/jython Maybe you forgot to specify a dependency? See also the whitelist_externals envconfig setting. jython installed: acme==0.14.1,alabaster==0.7.9,apipkg==1.4,appdirs==1.4.3,argh==0.26.1,arrow==0.10.0,attrs==16.3.0,Babel==2.3.4,backports-abc==0.5,backports.functools-lru-cache==1.2.1,backports.shutil-get-terminal-size==1.0.0,backports.ssl-match-hostname==3.5.0.1,bcrypt==3.1.3,BeautifulSoup==3.2.1,beautifulsoup4==4.6.0,bleach==1.5.0,bodhi==2.8.1,bodhi-client==2.8.1,boto==2.45.0,cached-property==1.3.0,CairoSVG==1.0.20,catfish==1.4.2,CCColUtils==1.5,certbot==0.14.1,cffi==1.9.1,characteristic==14.3.0,chardet==2.3.0,click==6.7,colorama==0.3.7,ConfigArgParse==0.12.0,configobj==5.0.6,configparser==3.5.0b2,coverage==4.0.3,coverage-pth==0.0.1,cryptography==1.7.2,cssselect==0.9.2,cycler==0.10.0,Cython==0.25.2,decorator==4.0.11,docker-py==1.10.6,docker-pycreds==0.2.1,dockerfile-parse==0.0.5,dockerpty==0.4.1,docopt==0.6.2,docutils==0.13.1,dogpile.cache==0.6.2,dropbox==6.5.0,duplicity==0.7.13.1,ecdsa==0.13,empy==3.3.2,enum34==1.1.6,execnet==1.4.1,fasteners==0.14.1,fedmsg==0.19.0,fedmsg-meta-fedora-infrastructure==0.18.0,fedmsg-notify==0.5.8,fedpkg==1.28,feedparser==5.2.1,file-magic==0.3.0,flake8==3.3.0,Flask==0.11.1,fmn==1.1.0,funcsigs==1.0.2,functools32==3.2.3.post2,future==0.16.0,GDAL==2.1.3,gitdb2==2.0.0,GitPython==2.1.3,GnuPGInterface==0.3.2,gpg==1.8.0,gssapi==1.2.0,html5lib==0.999,httplib2==0.9.2,idna==2.5,imagesize==0.7.1,iniparse==0.4,ino==0.3.6,ipaddress==1.0.16,IPy==0.81,ipython==5.3.0,ipython-genutils==0.1.0,isodate==0.5.4,itsdangerous==0.24,Jinja2==2.9.6,jsonschema==2.5.1,kerberos==1.2.5,kid==0.9.6,kitchen==1.2.4,kobo==0.5.2,libarchive-c==2.5,libtaskotron==0.4.24,linecache2==1.0.0,lockfile==0.11.0,lxml==3.7.2,M2Crypto==0.25.1,m2ext==0.1,MarkupSafe==0.23,mash==0.6.19,matplotlib==2.0.0,mccabe==0.6.1,mercurial==4.2,mistune==0.7.3,mock==2.0.0,moksha.common==1.2.4,moksha.hub==1.4.8,monotonic==1.2,munch==2.1.0,ndg-httpsclient==0.4.0,NINJA-IDE==2.3,nose==1.3.7,numpy==1.12.1,offtrac==0.1.0,olefile==0.44,openidc-client==0.3.0,ordered-set==2.0.0,osbs-client==0.39.1,OWSLib==0.14.0,packagedb-cli==2.14.1,packaging==16.8,paramiko==2.2.1,parsedatetime==2.2,path.py==5.2,pathlib==1.0.1,pathlib2==2.1.0,pathtools==0.1.2,pbr==1.10.0,pdfshuffler==0.6.0,pep8==1.6.2,pexpect==4.2.1,pickleshare==0.7.4,pika==0.10.0,Pillow==4.1.1,pluggy==0.3.1,ply==3.9,Printrun==2014.8.1,productmd==1.7,progressbar==2.3,prompt-toolkit==1.0.14,psutil==5.0.1,psycopg2==2.6.2,ptyprocess==0.5.2,pungi==4.1.16,py==1.4.34,pyasn1==0.2.3,pyasn1-modules==0.0.8,pycodestyle==2.0.0,pycparser==2.14,pycrypto==2.6.1,pycurl==7.43.0,pyflakes==1.5.0,pygit2==0.25.1,pyglet==1.2.4,Pygments==2.2.0,pygobject==3.24.1,pygpgme==0.3,pyinotify==0.9.6,pykickstart==2.35,pyliblzma==0.5.3,PyNaCl==1.1.1,PyOpenGL==3.1.1a1,PyOpenGL-accelerate==3.1.1a1,pyOpenSSL==16.2.0,pyparsing==2.1.10,pyparted==3.10.7,pyPdf==1.13,pypoppler==0.12.2,pyproj==1.9.5.1,pyRFC3339==1.0,pyserial==3.1.1,PySocks==1.5.7,pytest==3.1.1,pytest-watch==3.10.0,pytest-xdist==1.14,python-bugzilla==2.1.0,python-daemon==2.1.2,python-dateutil==2.6.0,python-fedora==0.9.0,python-multilib==1.2,python-yubico==1.3.2,python2-pythondialog==3.3.0,pytz==2016.10,pyusb==1.0.0,pyxattr==0.5.3,pyxdg==0.25,PyYAML==3.11,pyzmq==16.0.2,qpid-python==1.36.0,redis==2.10.5,reportlab==3.3.0,repoze.lru==0.4,requests==2.13.0,requests-kerberos==0.10.0,resultsdb-api==2.0.0,rfpkg==1.25.1,rhmsg==0.5,rhpkg==1.32,rpkg==1.49,rpm-python==4.13.0.1,rpmdiff==4.1.1,rsa==3.4.2,scipy==0.19.1,scour==0.35,sepolicy==1.1,service-identity==16.0.0,setools==4.1.0,simplegeneric==0.8.1,simplejson==3.10.0,singledispatch==3.4.0.3,six==1.10.0,smmap2==2.0.1,snowballstemmer==1.2.1,Sphinx==1.6.3,sphinx-rtd-theme==0.2.4,sphinxcontrib-websupport==1.0.1,SQLAlchemy==1.1.11,stomper==0.4.1,straight.plugin==1.4.0.post1,subprocess32==3.2.6,testcloud==0.1.11,texttable==0.9.0,tornado==4.4.2,tox==2.7.0,traceback2==1.4.0,traitlets==4.3.2,Twisted==16.4.1,txWS==0.9.1,txZMQ==0.8.0,typing==3.5.2.2,uniconvertor==2.0,unittest2==1.1.0,urlgrabber==3.10.1,urllib3==1.20,virtualenv==15.1.0,watchdog==0.8.3,wcwidth==0.1.7,websocket-client==0.40.0,Werkzeug==0.11.10,Whoosh==2.7.4,wxPython==3.0.2.0,wxPython-common==3.0.2.0,xunitparser==1.3.3,yum-metadata-parser==1.1.4,zope.component==4.3.0,zope.event==4.2.0,zope.interface==4.3.3 jython runtests: PYTHONHASHSEED='3898597219' jython runtests: commands[0] | python say.py Exception in thread "main" Traceback (most recent call last): File "/home/churchyard/tmp/jytox/.tox/jython/Lib/site.py", line 703, in <module> main() File "/home/churchyard/tmp/jytox/.tox/jython/Lib/site.py", line 684, in main paths_in_sys = addusersitepackages(paths_in_sys) File "/home/churchyard/tmp/jytox/.tox/jython/Lib/site.py", line 344, in addusersitepackages USER_BASE = joinuser("~", ".local") File "/home/churchyard/tmp/jytox/.tox/jython/Lib/site.py", line 325, in joinuser return os.path.expanduser(os.path.join(*args)) File "/home/churchyard/tmp/jytox/.tox/jython/Lib/posixpath.py", line 269, in expanduser userhome = pwd.getpwuid(os.getuid()).pw_dir AttributeError: 'module' object has no attribute 'getuid' ERROR: InvocationError: '/home/churchyard/tmp/jytox/.tox/jython/bin/python say.py' ____________________________________________________ summary ____________________________________________________ py27: commands succeeded py35: commands succeeded py36: commands succeeded pypy: commands succeeded pypy3: commands succeeded ERROR: jython: commands failed There seem to be other issues now. Firstly missing pip: $ . .tox/pypy3/bin/activate (pypy3) $ which pip ~/tmp/jytox/.tox/pypy3/bin/pip (pypy3) $ deactivate [jytox]$ . .tox/jython/bin/activate (jython) $ which pip /usr/bin/pip (jython) $ deactivate
That's weird. When I tried your original instructions from the bug description, it now works for me (see the ouput from my console session below.) Do you have anything extra going on that differs from the original bug report? [mbooth@fedora26 ~]$ cd tox [mbooth@fedora26 tox]$ cat << EOF > tox.ini > [tox] > envlist = jython > skipsdist = True > EOF [mbooth@fedora26 tox]$ tox jython create: /home/mbooth/tox/.tox/jython ERROR: InvocationError: Failed to get version_info for jython: could not decode b'>>> \r>>> def pyinfo():\r\n... \r... import sys\r\n... \r... return dict(version_info=tuple(sys.version_info),\r\n... \r... sysplatform=sys.platform)\r\n... \r... \r\n>>> \r>>> print(pyinfo())' ________________________________________________________________________________________________ summary _________________________________________________________________________________________________ ERROR: jython: InvocationError: Failed to get version_info for jython: could not decode b'>>> \r>>> def pyinfo():\r\n... \r... import sys\r\n... \r... return dict(version_info=tuple(sys.version_info),\r\n... \r... sysplatform=sys.platform)\r\n... \r... \r\n>>> \r>>> print(pyinfo())' [mbooth@fedora26 tox]$ [mbooth@fedora26 tox]$ sudo dnf install ~/jython-2.7.1-1.fc26.noarch.rpm Last metadata expiration check: 1:59:46 ago on Mon 14 Aug 2017 09:08:06 BST. Dependencies resolved. ========================================================================================================================================================================================================== Package Arch Version Repository Size ========================================================================================================================================================================================================== Upgrading: jython noarch 2.7.1-1.fc26 @commandline 10 M Transaction Summary ========================================================================================================================================================================================================== Upgrade 1 Package Total size: 10 M Is this ok [y/N]: y Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Upgrading : jython-2.7.1-1.fc26.noarch 1/2 Cleanup : jython-2.7.1-0.3.b3.fc26.noarch 2/2 Verifying : jython-2.7.1-1.fc26.noarch 1/2 Verifying : jython-2.7.1-0.3.b3.fc26.noarch 2/2 Upgraded: jython.noarch 2.7.1-1.fc26 Complete! [mbooth@fedora26 tox]$ tox jython create: /home/mbooth/tox/.tox/jython WARNING:test command found but not installed in testenv cmd: /usr/bin/pip env: /home/mbooth/tox/.tox/jython Maybe you forgot to specify a dependency? See also the whitelist_externals envconfig setting. jython installed: appdirs==1.4.3,asn1crypto==0.22.0,astroid==1.5.2,autopep8==1.2.4,Babel==2.3.4,backports.functools-lru-cache==1.2.1,backports.shutil-get-terminal-size==1.0.0,backports.ssl-match-hostname==3.5.0.1,bcrypt==3.1.3,beautifulsoup4==4.6.0,bodhi==2.9.0,bodhi-client==2.9.0,bunch==1.0.1,bzr==2.7.0,CCColUtils==1.5,cffi==1.9.1,chardet==2.3.0,click==6.7,configparser==3.5.0b2,cryptography==2.0.2,cssselect==0.9.2,decorator==4.0.11,Django==1.10.7,dockerfile-parse==0.0.5,enum34==1.1.6,fedpkg==1.28,file-magic==0.3.0,gitdb2==2.0.0,GitPython==2.1.3,gpg==1.8.0,gssapi==1.2.0,html5lib==0.999,humanize==0.5.1,idna==2.5,iniparse==0.4,ipaddress==1.0.16,IPy==0.81,ipython==5.3.0,ipython-genutils==0.1.0,isort==4.2.5,jsonpointer==1.10,jsonschema==2.5.1,kerberos==1.2.5,kitchen==1.2.4,langtable==0.0.37,lazy-object-proxy==1.3.1,lockfile==0.11.0,lxml==3.7.2,mccabe==0.6.1,mistune==0.7.3,munch==2.1.0,offtrac==0.1.0,olefile==0.44,openidc-client==0.3.0,ordered-set==2.0.0,osbs-client==0.39.1,packagedb-cli==2.14.1,packaging==16.8,paramiko==2.2.1,path.py==5.2,pathlib==1.0.1,pep8==1.6.2,pexpect==4.2.1,pickleshare==0.7.4,Pillow==4.1.1,pluggy==0.3.1,ply==3.9,progress==1.2,prompt-toolkit==1.0.14,ptyprocess==0.5.2,py==1.4.34,pyasn1==0.2.3,pycparser==2.14,pycurl==7.43.0,pyenchant==1.6.10,PyGithub==1.29,Pygments==2.2.0,pygobject==3.24.1,pygpgme==0.3,pyinotify==0.9.6,pykickstart==2.35,pyliblzma==0.5.3,PyNaCl==1.1.1,pyOpenSSL==16.2.0,pyparsing==2.1.10,PySocks==1.5.7,pytest==3.1.1,python-augeas==0.5.0,python-bugzilla==2.1.0,python-dateutil==2.6.0,python-dmidecode==3.12.2,python-fedora==0.9.0,python-yubico==1.3.2,pytz==2016.10,pyusb==1.0.0,pyxattr==0.5.3,PyXB==1.2.5,PyYAML==3.12,pyzmq==16.0.2,repoze.lru==0.4,requests==2.13.0,requests-kerberos==0.10.0,rpkg==1.49,rpm-python==4.13.0.1,simplegeneric==0.8.1,simplejson==3.10.0,singledispatch==3.4.0.3,six==1.10.0,slip==0.6.4,slip.dbus==0.6.4,smmap2==2.0.1,SSSDConfig==1.15.3,systemd-python==234,tox==2.7.0,traitlets==4.3.2,urlgrabber==3.10.1,urllib3==1.20,virtualenv==15.1.0,wcwidth==0.1.7,wrapt==1.10.10,yum-langpacks==0.4.5,yum-metadata-parser==1.1.4 jython runtests: PYTHONHASHSEED='686291700' ________________________________________________________________________________________________ summary _________________________________________________________________________________________________ jython: commands succeeded congratulations :)
jython-2.7.1-1.fc26 eclipse-pydev-5.9.0-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-9e4c33a1ff
With the original instructions, I get command succeeded as well. However, the problem is: The list of package is not form that virtualenv, but system-installed python2. When you append: [testenv] commands=python -c 'print("foo")' to tox.ini, you get the error: Exception in thread "main" Traceback (most recent call last): File "/home/churchyard/tmp/jytox/.tox/jython/Lib/site.py", line 703, in <module> main() File "/home/churchyard/tmp/jytox/.tox/jython/Lib/site.py", line 684, in main paths_in_sys = addusersitepackages(paths_in_sys) File "/home/churchyard/tmp/jytox/.tox/jython/Lib/site.py", line 344, in addusersitepackages USER_BASE = joinuser("~", ".local") File "/home/churchyard/tmp/jytox/.tox/jython/Lib/site.py", line 325, in joinuser return os.path.expanduser(os.path.join(*args)) File "/home/churchyard/tmp/jytox/.tox/jython/Lib/posixpath.py", line 269, in expanduser userhome = pwd.getpwuid(os.getuid()).pw_dir AttributeError: 'module' object has no attribute 'getuid' ERROR: InvocationError: '/home/churchyard/tmp/jytox/.tox/jython/bin/python -c print("foo")'
> The list of package is not form that virtualenv, but system-installed python2. I'm not sure what the relationship is between tox and virtualenv, but virtualenv works fine with jython now, right? So is this a problem with tox? I don't really understand what it is trying to do. Do you have the same problem with jython downloaded from upstream (to eliminate packaging problems)?
Actually the (first) problem I see is missing pip form the created virtualenv: $ python3 -m virtualenv py3 --python=/usr/bin/python3 Already using interpreter /usr/bin/python3 Using base prefix '/usr' New python executable in /home/churchyard/py3/bin/python3 Also creating executable in /home/churchyard/py3/bin/python Installing setuptools, pip, wheel...done. $ . py3/bin/activate (py3) $ which pip ~/py3/bin/pip (py3) $ python -m pip ... (pip's help) (py3) $ deactivate $ python3 -m virtualenv jy --python=/usr/bin/jython Running virtualenv with interpreter /usr/bin/jython Cannot find file /usr/share/jython/Include (bad symlink) Cannot find file /usr/share/jython/cachedir (bad symlink) New jython executable in /home/churchyard/jy/bin/jython Installing setuptools, pip, wheel...done. $ . jy/bin/activate (jy) $ which pip /usr/bin/pip (jy) $ python -m pip /home/churchyard/jy/bin/jython: No module named pip (jy) $ deactivate Will try with downloaded Jython.
(When installing Jython using the jar installer, one of the steps (at 90 %) is: Installing pip and setuptools.) In virtualenv, I have the pip command and module: [pythonista@fedora Downloads]$ virtualenv-3 jy --python=/home/pythonista/jython2.7.0/bin/jython Running virtualenv with interpreter /home/pythonista/jython2.7.0/bin/jython Cannot find file /home/pythonista/jython2.7.0/Include (bad symlink) New jython executable in /home/pythonista/Downloads/jy/bin/jython Installing setuptools, pip, wheel...done. [pythonista@fedora Downloads]$ . jy/bin/activate (jy) [pythonista@fedora Downloads]$ which pip ~/Downloads/jy/bin/pip (jy) [pythonista@fedora Downloads]$ python -m pip Usage: pip <command> [options] ... (jy) [pythonista@fedora Downloads]$ Also, tox works: [pythonista@fedora jytest]$ PATH="/home/pythonista/jython2.7.0/bin:$PATH" [pythonista@fedora jytest]$ which jython ~/jython2.7.0/bin/jython [pythonista@fedora jytest]$ tox jython create: /home/pythonista/.tox/jython jython installed: jython runtests: PYTHONHASHSEED='3786205468' jython runtests: commands[0] | python -c print("foo") foo _________________________________________________________________________________________________ summary _________________________________________________________________________________________________ jython: commands succeeded congratulations :)
Back to the RPm instlled jython, using -v flag with virtualenv: $ virtualenv-3 jytest2 --python=/usr/bin/jython -v ... Installing setuptools, pip, wheel... Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel Traceback (most recent call last): File "<stdin>", line 7, in <module> File "/usr/lib/python3.6/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/__init__.py", line 26, in <module> File "/usr/lib/python3.6/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/utils/__init__.py", line 60, in <module> File "/usr/lib/python3.6/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/utils/__init__.py", line 60, in <module> java.lang.NoClassDefFoundError: org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream at org.python.modules.bz2.bz2.classDictInit(bz2.java:23) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.python.core.PyJavaType.init(PyJavaType.java:571) at org.python.core.PyType.createType(PyType.java:1523) at org.python.core.PyType.addFromClass(PyType.java:1462) at org.python.core.PyType.fromClass(PyType.java:1551) at org.python.core.imp.createFromClass(imp.java:469) at org.python.core.imp.loadBuiltin(imp.java:578) at org.python.core.imp.find_module(imp.java:534) at org.python.core.imp.import_next(imp.java:838) at org.python.core.imp.import_module_level(imp.java:957) at org.python.core.imp.importName(imp.java:1057) at org.python.core.ImportFunction.__call__(__builtin__.java:1280) at org.python.core.PyObject.__call__(PyObject.java:450) at org.python.core.__builtin__.__import__(__builtin__.java:1232) at org.python.core.imp.importOne(imp.java:1076) at pip.utils$py.f$0(/usr/lib/python3.6/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/utils/__init__.py:850) at pip.utils$py.call_function(/usr/lib/python3.6/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/utils/__init__.py) at org.python.core.PyTableCode.call(PyTableCode.java:171) at org.python.core.PyCode.call(PyCode.java:18) at org.python.core.imp.createFromCode(imp.java:436) at org.python.core.util.importer.importer_load_module(importer.java:116) at org.python.modules.zipimport.zipimporter.zipimporter_load_module(zipimporter.java:170) at org.python.modules.zipimport.zipimporter$zipimporter_load_module_exposer.__call__(Unknown Source) at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:46) at org.python.core.imp.loadFromLoader(imp.java:593) at org.python.core.imp.find_module(imp.java:547) at org.python.core.PyModule.impAttr(PyModule.java:111) at org.python.core.imp.import_next(imp.java:840) at org.python.core.imp.import_logic(imp.java:905) at org.python.core.imp.import_module_level(imp.java:970) at org.python.core.imp.importName(imp.java:1057) at org.python.core.ImportFunction.__call__(__builtin__.java:1280) at org.python.core.PyObject.__call__(PyObject.java:450) at org.python.core.__builtin__.__import__(__builtin__.java:1232) at org.python.core.imp.importFromAs(imp.java:1149) at org.python.core.imp.importFrom(imp.java:1124) at pip$py.f$0(/usr/lib/python3.6/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/__init__.py:331) at pip$py.call_function(/usr/lib/python3.6/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/__init__.py) at org.python.core.PyTableCode.call(PyTableCode.java:171) at org.python.core.PyCode.call(PyCode.java:18) at org.python.core.imp.createFromCode(imp.java:436) at org.python.core.util.importer.importer_load_module(importer.java:116) at org.python.modules.zipimport.zipimporter.zipimporter_load_module(zipimporter.java:170) at org.python.modules.zipimport.zipimporter$zipimporter_load_module_exposer.__call__(Unknown Source) at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:46) at org.python.core.imp.loadFromLoader(imp.java:593) at org.python.core.imp.find_module(imp.java:547) at org.python.core.imp.import_next(imp.java:838) at org.python.core.imp.import_module_level(imp.java:957) at org.python.core.imp.importName(imp.java:1057) at org.python.core.ImportFunction.__call__(__builtin__.java:1280) at org.python.core.PyObject.__call__(PyObject.java:450) at org.python.core.__builtin__.__import__(__builtin__.java:1232) at org.python.core.imp.importOne(imp.java:1076) at org.python.pycode._pyx0.f$0(<stdin>:26) at org.python.pycode._pyx0.call_function(<stdin>) at org.python.core.PyTableCode.call(PyTableCode.java:171) at org.python.core.PyCode.call(PyCode.java:18) at org.python.core.Py.runCode(Py.java:1614) at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:296) at org.python.util.jython.run(jython.java:337) at org.python.util.jython.main(jython.java:142) Caused by: java.lang.ClassNotFoundException: org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 66 more java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream ...Installing setuptools, pip, wheel...done.
Opened https://github.com/pypa/virtualenv/issues/1073 for the fact that the failure of installing setuptools, pip, wheel was not properly reported.
Aha, this backtrace tells me there is a missing runtime dep for jython, you can try to fix this by doing: $ sudo ln -s $(build-classpath apache-commons-compress) /usr/share/jython/javalib/
That indeed workaround the issue, however, we have another problem: $ virtualenv-3 jytest --python=/usr/bin/jython Running virtualenv with interpreter /usr/bin/jython Cannot find file /usr/share/jython/Include (bad symlink) Cannot find file /usr/share/jython/cachedir (bad symlink) New jython executable in /home/churchyard/tmp/jytox/jytest/bin/jython Installing setuptools, pip, wheel... Complete output from command /home/churchyard/tmp/jytox/jytest/bin/jython - setuptools pip wheel: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Collecting setuptools Could not fetch URL https://pypi.python.org/simple/setuptools/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping Exception: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/usr/lib/python3.6/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/commands/install.py", line 324, in run requirement_set.prepare_files(finder) File "/usr/lib/python3.6/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/commands/install.py", line 324, in run requirement_set.prepare_files(finder) File "/usr/lib/python3.6/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/req/req_set.py", line 376, in prepare_files discovered_reqs.extend(self._prepare_file( File "/usr/lib/python3.6/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/req/req_set.py", line 376, in prepare_files discovered_reqs.extend(self._prepare_file( File "/usr/lib/python3.6/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/req/req_set.py", line 617, in _prepare_file unpack_url( File "/usr/lib/python3.6/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/req/req_set.py", line 617, in _prepare_file unpack_url( File "/usr/lib/python3.6/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/download.py", line 809, in unpack_url unpack_file_url(link, location, download_dir, hashes=hashes) File "/usr/lib/python3.6/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/download.py", line 715, in unpack_file_url unpack_file(from_path, location, content_type, link) File "/usr/lib/python3.6/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/utils/__init__.py", line 596, in unpack_file unzip_file( File "/usr/lib/python3.6/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/utils/__init__.py", line 498, in unzip_file ensure_dir(dir) File "/usr/lib/python3.6/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/utils/__init__.py", line 83, in ensure_dir os.makedirs(path) File "/home/churchyard/tmp/jytox/jytest/Lib/os.py", line 174, in makedirs mkdir(name, mode) OSError: [Errno 20000] Unknown error: 20000: '/tmp/pip-build-pvq1yG/setuptools' ---------------------------------------- ...Installing setuptools, pip, wheel...done. Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/virtualenv.py", line 2329, in <module> main() File "/usr/lib/python3.6/site-packages/virtualenv.py", line 703, in main create_environment(home_dir, File "/usr/lib/python3.6/site-packages/virtualenv.py", line 941, in create_environment install_wheel( File "/usr/lib/python3.6/site-packages/virtualenv.py", line 901, in install_wheel call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT) File "/usr/lib/python3.6/site-packages/virtualenv.py", line 795, in call_subprocess raise OSError( OSError: Command /home/churchyard/tmp/jytox/jytest/bin/jython - setuptools pip wheel failed with error code 2
eclipse-pydev-5.9.0-1.fc26, jython-2.7.1-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-9e4c33a1ff
Okay, I think I really fixed it this time. Can you try again with the latest builds of jython, netty and jctools from Rawhide: https://koji.fedoraproject.org/koji/buildinfo?buildID=955605 https://koji.fedoraproject.org/koji/buildinfo?buildID=954967 https://koji.fedoraproject.org/koji/buildinfo?buildID=954891
Yes! $ tox jython create: /home/churchyard/tmp/jytox/.tox/jython jython installed: jython runtests: PYTHONHASHSEED='2853433524' jython runtests: commands[0] | python -c print("foo") foo ____________________________________________________________________________________________________________ summary ____________________________________________________________________________________________________________ jython: commands succeeded congratulations :) Thank you! Thank you! Thank you!
Cool, I'll try and get these versions into F26 Thanks for helping me test :-)
eclipse-pydev-5.9.0-1.fc26 jctools-2.0.2-1.fc26 jython-2.7.1-2.fc26 netty-4.1.13-1.fc26 qpid-jms-0.9.0-5.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-9e4c33a1ff
eclipse-pydev-5.9.0-1.fc26, jctools-2.0.2-1.fc26, jython-2.7.1-2.fc26, netty-4.1.13-1.fc26, qpid-jms-0.9.0-5.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-9e4c33a1ff
eclipse-pydev-5.9.0-1.fc26, jctools-2.0.2-1.fc26, jython-2.7.1-2.fc26, netty-4.1.13-1.fc26, qpid-jms-0.9.0-5.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.