I have set the variables JYTHON_HOME
to the directory where I have installed Jython and JYTHON_PATH
to the bin folder, but I still get the following error when I try to run jython:
'jython' is not recognized as an internal or external command,
operable program or batch file.
Why do I get this error? The Java installation has no issues.
The PATH environment variable (for searching the executable programs) is applicable to all applications; while CLASSPATH is used by Java only.
Java does not need any environment variables to be set. However, setting some environment variables makes some things easier. PATH If the jre/bin folder is on the path, you don't have to qualify to run the java command. If the jdk/bin folder is on the path, you don't have to qualify to run the java and javac commands.
I am Windows user & I have installed Jython in C:\jython2.7.0
.
I had neither set the JYTHON_HOME
environment variable nor added %JYTHON_HOME%\bin
to PATH
environment variable. I also got the same error as shown in the question.
JYTHON_HOME
with value C:\jython2.7.0
.You've to use your own Jython's installation folder.
%JYTHON_HOME%\bin
to PATH
environment variable as the below 2 image shows.Create new PATH environment variable if it is not already there (This is rare case).
jython
, it will work. Now you can try executing simple Python statements as the below image shows.Do not use the already opened Terminal.
That's it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With