Results 1 to 9 of 9

Thread: Proper way to install latest jython2.7.0 in oSUSE Leap 42.1

  1. #1

    Default Proper way to install latest jython2.7.0 in oSUSE Leap 42.1

    I would like to install Jython2.7.0 and am struggling a bit and am hoping someone here can give me a hand especially if they have already gone through the motions....

    Whenever I run the installer It successfully completes but then I am unable to run the REPL to validate the install. If I use sudo however it works but throws warnings.

    I'm new to oSUSE and am currently using Leap 42.1. Thanks in advance. underneath are the errors and warnings I encountered...

    RUNNING UNPRIVILEGED:
    -------------------------------
    Code:
    :/opt/Jython> jython2.7.0/bin/jython 
    Exception in thread "main" java.lang.NoSuchMethodError: method java.lang.Character.isSurrogate with signature (C)Z was not found.
       at org.python.core.PyUnicode.getSupplementaryCounts(PyUnicode.java:348)
       at org.python.core.PyUnicode.chooseIndexTranslator(PyUnicode.java:518)
       at org.python.core.PyUnicode.<init>(PyUnicode.java:122)
       at org.python.core.PyUnicode.<init>(PyUnicode.java:49)
       at org.python.core.Py.<clinit>(Py.java:117)
       at java.lang.Class.initializeClass(libgcj.so.14)
       at org.python.core.PyType.init(PyType.java:544)
       at org.python.core.PyType.createType(PyType.java:1412)
       at org.python.core.PyType.addFromClass(PyType.java:1348)
       at org.python.core.PyType.fromClass(PyType.java:1439)
       at org.python.core.PyType.fromClass(PyType.java:1423)
       at org.python.core.PyStringMap.getLazyType(PyStringMap.java:66)
       at org.python.core.PyStringMap.<init>(PyStringMap.java:46)
       at org.python.core.PyStringMap.<init>(PyStringMap.java:42)
       at org.python.expose.BaseTypeBuilder.getDict(BaseTypeBuilder.java:48)
       at org.python.core.PyType.init(PyType.java:532)
       at org.python.core.PyType.addBuilder(PyType.java:1338)
       at org.python.core.PyType.<clinit>(PyType.java:35)
       at java.lang.Class.initializeClass(libgcj.so.14)
       at org.python.core.PyObject.<init>(PyObject.java:93)
       at org.python.core.PyBuiltinCallable.<init>(PyBuiltinCallable.java:22)
       at org.python.core.PyBuiltinMethod.<init>(PyBuiltinMethod.java:16)
       at org.python.core.PyBuiltinMethodNarrow.<init>(PyBuiltinMethodNarrow.java:23)
       at org.python.core.PyDataDescr$getset_descriptor___get___exposer.<init>(Unknown Source)
       at org.python.core.PyDataDescr$PyExposer.<init>(Unknown Source)
       at org.python.core.PyDataDescr.<clinit>(PyDataDescr.java)
       at java.lang.Class.initializeClass(libgcj.so.14)
       at java.lang.Class.initializeClass(libgcj.so.14)
       at org.python.core.PyBuiltinCallable$PyExposer.<init>(Unknown Source)
       at org.python.core.PyBuiltinCallable.<clinit>(PyBuiltinCallable.java)
       at java.lang.Class.initializeClass(libgcj.so.14)
       at java.lang.Class.initializeClass(libgcj.so.14)
       at java.lang.Class.initializeClass(libgcj.so.14)
       at org.python.core.PyObject$PyExposer.<init>(Unknown Source)
       at org.python.core.PyObject.<clinit>(PyObject.java:28)
       at java.lang.Class.initializeClass(libgcj.so.14)
       at java.lang.Class.initializeClass(libgcj.so.14)
       at org.python.util.jython.run(jython.java:241)
       at org.python.util.jython.main(jython.java:142)
    RUNNING WITH SUDO:
    ---------------------------
    Code:
    :/opt/Jython/jython2.7.0> sudo bin/jython
    [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
    [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
    Jython 2.7.0 (default:9987c746f838, Apr 29 2015, 02:25:11) 
    [OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.8.0_101
    Type "help", "copyright", "credits" or "license" for more information.
    >>> print ('hello world')
    hello world
    >>> exit()

  2. #2
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: Proper way to install latest jython2.7.0 in oSUSE Leap 42.1

    where and how did you get 2.7.0
    opensuse only has 2.2.1 (even TW)
    https://software.opensuse.org/package/jython
    it looks like a missing java library, installing 2.2.1 with zypper should pull all needed libraries
    install and see if 2.2.1 is working, and then try 2.7.0
    Code:
    zypper in jython
    how did you install it, how are you running it?

    edit
    it seams juthon comes as a standalone jar file
    what version of java do you have installed?
    Code:
    zypper info java
    installing the old rpm and using the jar file is a possible fix

  3. #3

    Default Re: Proper way to install latest jython2.7.0 in oSUSE Leap 42.1

    Quote Originally Posted by I_A View Post
    where and how did you get 2.7.0
    opensuse only has 2.2.1 (even TW)
    https://software.opensuse.org/package/jython
    it looks like a missing java library, installing 2.2.1 with zypper should pull all needed libraries
    install and see if 2.2.1 is working, and then try 2.7.0
    Code:
    zypper in jython
    how did you install it, how are you running it?

    edit
    it seams juthon comes as a standalone jar file
    what version of java do you have installed?
    Code:
    zypper info java
    installing the old rpm and using the jar file is a possible fix
    I initially tried the official Jython in the repos but it is ancient as you have discovered!
    The current jython2 is virtually at parity with the python2 vanilla interpreter. So I removed it and went straight to http://www.jython.org/downloads.html and downloaded both installers.
    The standalone jar works but it isn't really what I want. I would like an installed version which I can then link to a global path.

    Waiting for oSUSE to officially update the repos may be a pipe-dream unless the Jython crew spits out a Jython 3.5 interpreter sometime in the future.

    As for a missing library, I doubt it as it works when I run it with 'sudo'. Just that I receive those warnings in my original post. Also the standalone jar works perfectly, problem is it is cumbersome to work with and don't know how to use pip with it.

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,143
    Blog Entries
    2

    Default Re: Proper way to install latest jython2.7.0 in oSUSE Leap 42.1

    I don't know if you might want to wait until jython 2.7 is better documented...

    - There isn't any dependency listing anywhere I've found on the jython site or documentation for any version of jython.
    - The current jython documentation is only 2.5 (which may work, but YMMV)
    - Note that as of today jython2.5.4rc1 is still a "current, stable and supported" version. That likely means that it's the best recommended version to use and 2.7 is only the first (and likely buggy) version of a completely different codebase.

    I can only suggest that <maybe> adding an openSUSE python repo might help, but I can't even suggest a Python 2 or Python 3 repo... but the following will install the Python 2 repo for LEAP 42.1
    Code:
    zypper -n ar -f http://download.opensuse.org/repositories/devel:/languages:/python/openSUSE_Leap_42.1/ python:_LEAP_42.1
    It doesn't look difficult to build your own Jython, the following pulls source directly from the current latest
    http://www.jython.org/devguide/

    In any case, IMO the warnings you're getting when running in sudo are likely less significant and shouldn't prevent executing most scripts. And, I don't really have too much of an opinion about trying to run in unprivileged mode except that I wouldn't configure lower level code execution to run without elevated permissions which might be the thought of the jython authors... but I'm guessing about some unknown person(s) thoughts...

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  5. #5
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: Proper way to install latest jython2.7.0 in oSUSE Leap 42.1

    according to this
    https://wiki.python.org/jython/InstallationInstructions
    jython 2.7 comes as a jar file which is both an installer and a standalone interpreter it does not use or need python libraries
    try running
    Code:
    $ java -jar jython_installer-2.7.0.jar --help
    do not run the installer as root as it's not an rpm installer it might mess up your system

  6. #6

    Default Re: Proper way to install latest jython2.7.0 in oSUSE Leap 42.1

    Quote Originally Posted by tsu2 View Post
    I don't know if you might want to wait until jython 2.7 is better documented...

    - There isn't any dependency listing anywhere I've found on the jython site or documentation for any version of jython.
    - The current jython documentation is only 2.5 (which may work, but YMMV)
    - Note that as of today jython2.5.4rc1 is still a "current, stable and supported" version. That likely means that it's the best recommended version to use and 2.7 is only the first (and likely buggy) version of a completely different codebase.

    I can only suggest that <maybe> adding an openSUSE python repo might help, but I can't even suggest a Python 2 or Python 3 repo... but the following will install the Python 2 repo for LEAP 42.1
    Code:
    zypper -n ar -f http://download.opensuse.org/repositories/devel:/languages:/python/openSUSE_Leap_42.1/ python:_LEAP_42.1
    It doesn't look difficult to build your own Jython, the following pulls source directly from the current latest
    http://www.jython.org/devguide/

    In any case, IMO the warnings you're getting when running in sudo are likely less significant and shouldn't prevent executing most scripts. And, I don't really have too much of an opinion about trying to run in unprivileged mode except that I wouldn't configure lower level code execution to run without elevated permissions which might be the thought of the jython authors... but I'm guessing about some unknown person(s) thoughts...

    TSU

    Thanks for that!
    Looks like I'll just have to wait till it makes it to oSUSE repos. Unfortunate really as oSUSE is probably my favourite distro. But I have to work on the latest Jython release.
    On a side note though, I've had no problem installing it on Ubuntu. While Fedora 24 has Jython 2.7.1b3 in their rpm repos and is the default Jython.

    Cheers... DanglingPointer

  7. #7
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: Proper way to install latest jython2.7.0 in oSUSE Leap 42.1

    Quote Originally Posted by DanglingPointer View Post
    Thanks for that!
    Looks like I'll just have to wait till it makes it to oSUSE repos. Unfortunate really as oSUSE is probably my favourite distro. But I have to work on the latest Jython release.
    On a side note though, I've had no problem installing it on Ubuntu. While Fedora 24 has Jython 2.7.1b3 in their rpm repos and is the default Jython.

    Cheers... DanglingPointer
    you can ping one of the maintainers to update the build
    https://build.opensuse.org/package/u...ap:42.1/jython

  8. #8

    Default Re: Proper way to install latest jython2.7.0 in oSUSE Leap 42.1

    Quote Originally Posted by I_A View Post
    you can ping one of the maintainers to update the build
    https://build.opensuse.org/package/u...ap:42.1/jython
    I sent all of them an email. Hopefully they accept the request.

  9. #9

    Default Re: Proper way to install latest jython2.7.0 in oSUSE Leap 42.1

    Quote Originally Posted by DanglingPointer View Post
    Thanks for that!
    Looks like I'll just have to wait till it makes it to oSUSE repos. Unfortunate really as oSUSE is probably my favourite distro. But I have to work on the latest Jython release.
    On a side note though, I've had no problem installing it on Ubuntu. While Fedora 24 has Jython 2.7.1b3 in their rpm repos and is the default Jython.

    Cheers... DanglingPointer

    Those are the maintainers of the distribution, not of the jython package - so they won't be able to help you. The correct approach in any case is to file a bug report and not to send emails to people for such a case.

    A bug report can then be moved to the appropriate people responsible for the package.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •