• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to solve the sys.executable issue being empty when running Jython standalone?

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am unable to execute the following command"
java -jar ~/.m2/repository/org/python/jython-standalone/2.7.0/jython-standalone-2.7.0.jar -m ensurepip

I get the following stack trace. Can anyone please guide me as to what is the issue and how to solve it?

   Traceback (most recent call last):
 File "/Users/***/.m2/repository/org/python/jython-standalone/2.7.0/jython-standalone-2.7.0.jar/Lib/runpy.py", line 161, in _run_module_as_main
 File "/Users/***/.m2/repository/org/python/jython-standalone/2.7.0/jython-standalone-2.7.0.jar/Lib/runpy.py", line 72, in _run_code
 File "/Users/***/.m2/repository/org/python/jython-standalone/2.7.0/jython-standalone-2.7.0.jar/Lib/ensurepip/__main__.py", line 4, in <module>
 File "/Users/***/.m2/repository/org/python/jython-standalone/2.7.0/jython-standalone-2.7.0.jar/Lib/ensurepip/__init__.py", line 220, in _main
 File "/Users/***/.m2/repository/org/python/jython-standalone/2.7.0/jython-standalone-2.7.0.jar/Lib/ensurepip/__init__.py", line 123, in bootstrap
 File "/Users/***/.m2/repository/org/python/jython-standalone/2.7.0/jython-standalone-2.7.0.jar/Lib/ensurepip/__init__.py", line 45, in _run_pip
 File "/var/folders/96/llwnx0n57vd17gtfyw124z500000gq/T/tmpARwn47/pip-1.6-py2.py3-none-any.whl/pip/__init__.py", line 10, in <module>
 File "/var/folders/96/llwnx0n57vd17gtfyw124z500000gq/T/tmpARwn47/pip-1.6-py2.py3-none-any.whl/pip/util.py", line 13, in <module>
 File "/var/folders/96/llwnx0n57vd17gtfyw124z500000gq/T/tmpARwn47/pip-1.6-py2.py3-none-any.whl/pip/backwardcompat/__init__.py", line 115, in <module>
 File "/Users/***/.m2/repository/org/python/jython-standalone/2.7.0/jython-standalone-2.7.0.jar/Lib/distutils/sysconfig.py", line 28, in <module>
 File "/Users/***/.m2/repository/org/python/jython-standalone/2.7.0/jython-standalone-2.7.0.jar/Lib/posixpath.py", line 367, in realpath
 File "/Users/***/.m2/repository/org/python/jython-standalone/2.7.0/jython-standalone-2.7.0.jar/Lib/posixpath.py", line 373, in _joinrealpath
 File "/Users/***/.m2/repository/org/python/jython-standalone/2.7.0/jython-standalone-2.7.0.jar/Lib/posixpath.py", line 61, in isabs
AttributeError: 'NoneType' object has no attribute 'startswith'

Thanks and regards,
Paddy

Tried searching for this specific error and got [url]this post[https://stackoverflow.com/questions/59284551/jython-unable-to-install-ensurepip] as the first search result but it didn't really helpe me.
 
Ranch Hand
Posts: 607
11
Android Python Open BSD VI Editor Slackware
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
write here https://github.com/jython/jython/issues/

Please look before in internet how you are supposed to write an issue in github is the official repository, so is good if you do your homeworks

good luck!
 
Saloon Keeper
Posts: 27861
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I really don't recommend running Jython directly from the Maven repository. It would be cleaner to keep a copy in a more traditional place such as a ~/bin/ directory.

You can download the standalone 2.7 release from here: https://www.jython.org/download

However, this references Python 2.7. Python 2 went solidly end-of-life over 2 years ago now and many distros no longer install or support it.

Attempting to run Python 2.7 under the Python 3 infrastructure probably will bomb as there are significant differences. It's not backwards-compatible like Java is.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic