Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Launching Python has encounterd a. Unable to get project for the run

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.

like image 259
Elmer Avatar asked Mar 25 '13 13:03

Elmer


People also ask

How to add Python to Eclipse ide?

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.

How do I run a Python project?

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!


1 Answers

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 !

like image 67
Serge Avatar answered Sep 21 '22 07:09

Serge