Launching Python has encounterd a problem. Unable to get project for the run
It would let me put the word problem in the title.
The title is the exact message i get when i try to run/debug a file in Aptana 3.
I have always been able to run Python in Eclipse without problems. Does anyone know what causes this error?
For testing purposes i just created a new Pydev project with only 1 file in it.
Go to Window → Preferences. In the Preferences window, expand PyDev and select Interpreter-Python. Click "New..." and type Python32 for the Interpreter name. For the Interpreter executable, browse to your copy of Python (C:\Program Files\Python32\python.exe), and press Open.
Using the python Command To run Python scripts with the python command, you need to open a command-line and type in the word python , or python3 if you have both versions, followed by the path to your script, just like this: $ python3 hello.py Hello World!
I had the same problem with Aptana and just solved it. In my case I had configured another interpreter (IronPython) for running another script. When I got back to a previous script I got the same error message as you "Unable to get project for the run" because it was trying to run it with IronPython instead of Python.
I would therefore recommand the following:
1) Check your interpreter configuration. -> Window -> Preferences -> Pydev -> Interpreter Python
If you have no interpreter there try autoconfig. If it doesn't work you will have to browse it yourself by clicking New (then it should be somewhere like C:\Python27\python.exe)
2) If you have an interpreter, it means that Aptana is trying to run your script with another interpreter. In that case right click on your script file in Aptana -> Run as -> Python run.
That worked for me.
Good luck !
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