简体   繁体   中英

How can I run a python program in Komodo IDE like in IDLE(Python GUI) using Run Module feature?

Sorry I am a Python beginner and after several months with Python(GUI) I now want to move to Komodo IDE 8.5 (Suggested by posts on this forum), but I had trouble on configuring it to proper use. The main issue is how I can run a Python program in Komodo like in IDLE(Python GUI) using Run Module (pressing F5) feature?

When I pressed F5 in Komodo IDE 8.5, I got message "No Python interpreter is available".

I am using Python 3.30. Python.exe is in this path "D:\\1_tools\\python". Komodo.exe is in this path "D:\\1_tools\\komodo_IDE"

Thanks for any kind helpers. I have searched the forum but did not get any helpful info. Thanks again.

There is a thread on the Komodo Community Site that discusses this exact situation. ( http://community.activestate.com/node/10113 )


Sumarizing:

It seems that Komodo IDE defaults to using Python2 and since it can't find a Python2 interpreter, it complains.

Solution :

  • For existing files, the suggested solution is to tell Komodo IDE (via "Properties and Settings" on the Editor Tab) that the file uses the Python 3 interpreter.

  • If you create all new python source files using the Python3 template, the IDE will be able to run them.
    Beware: The first time you want to use the Python3 template you will have to create the new file using the menu: "File" -> "New" -> "File from Template", then select the Python 3 template.

Is Python on your PATH? That is, if you open a command prompt and type python by itself, does it run? In Komodo, look under Edit/Preferences/Languages/Python3 and check the configuration. If python.exe is not on your PATH you can provide the full path to it there

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM