javacmdenvironment-variablesjython-2.7

Error loading python27.dll (error code 14001) while running Jython script by cmd


I have installed Jython on my Windows 7 machine, something I did often.
I have set the environment variable PATH with the path C:\jython2.7.1\bin\ and I launched the program from cmd as jython myProgram.py.

The following error appears:

Error loading Python DLL: C:\jython2.7.1\bin\python27.dll (error code 14001)

I've also tried to launch the program with C:\jython2.7.1\jython.jar myProgram.py and it works! The problem is that I can't debug at runtime.
Why that error while I run jython myProgram.py? It had never happened to me before.
Yet the python27.dll file in the bin folder is there!
I hope it's nothing serious.


Solution

  • On Windows 7 you are using a too high version of Jython. Go to this site, download and install the 2.7.0 version.

    After that, set the PATH environment variable as C:\jython2.7.0\bin.