21
  1. I downloaded jython_installer-2.5.2.jar from jython.org.
  2. Opened the terminal and gave this command:-

java -jar jython_installer-2.5.2.jar

  1. It was installed in a folder named jython2.5.2 in the home directory
  2. But whenever I open the terminal and give the command jython in the terminal I am shown a message saying Jython is not installed.

How can I fix this problem?

I can install Jython using sudo apt-get install jython, but the Jython in Ubuntu repositories is 2.2.1 and I want the new version..

1
  • Please read the description of tags before applying them. The tags "linux" and "shell" were wrong. I think that at least the "linux" description changed since the writing of the question though, so maybe that was not your fault. Commented Jul 29, 2018 at 7:43

3 Answers 3

33

To install Jython with super user privileges:

sudo java -jar jython_installer-2.5.2.jar

Select /usr/local/lib/jython, then create a symbol link of Jython to /usr/local/bin:

sudo ln -s /usr/local/lib/jython/bin/jython /usr/local/bin/jython
Sign up to request clarification or add additional context in comments.

4 Comments

yeah!I read your blog on that and fixed it.. thanks a tonne !
When I run jython from the bin folder it doesn't start up. Do I need to change the permissions? Or do I have to always run ./jython
I am using ubuntu 15.04 and I can install jython directly by sudo apt-get install jython
I have the same problem as the poster and Sun Ning's solution didn't help. Despite running sudo java -jar ... my /usr/local/lib does not contain jython
14

When you type in jython, the shell looks for a program with that name in the PATH. You should either call the program with its full path:

# ~ is an abbreviation for your homedir
~/jython2.5.2/bin/jython

or add the directory with the executable to your PATH:

PATH=$HOME/jython2.5.2/bin:$PATH

If you want the latter to persist across terminal sessions, add it to your ~/.bashrc.

1 Comment

This should be the accepted answer, because it explains why it is not working.
2

If you have ubuntu 19.04, you can install with apt

sudo apt install jython

1 Comment

Works on 18.04.3 also!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.