This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Python3 - unsupported interpreter

Tags: None
(comma "," separated)
JohnDoe2991
Registered Member
Posts
2
Karma
0

Python3 - unsupported interpreter

Mon Sep 12, 2016 6:38 pm
Hi everyone!

I recently started learning Python3 and wanted to give KDevelop a try. But as soon as I try to debug my code all I get is this error message:

Unsupported Interpreter - KDevelop
Sorry, debugging is only supported for Python 3.x applications.


First, I thought something is wrong with my code, so I deleted everything and just wrote:

Code: Select all
print("test")


But I got the same error. Maybe I screwed up my Kubuntu installation back some time, so I set up a virtualbox with Kubuntu 16.04 and the latest AppImage from the homepage, but again the same error.

I'm pretty sure it is a quite simple mistake I make, but I cannot figure it out. I hope someone can help me!
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
Try putting "python3" in the "interpreter" box in the launch configuration dialog. It's possible your distribution still has "/usr/bin/python" as python 2 by default.


I'm working on the KDevelop IDE.
JohnDoe2991
Registered Member
Posts
2
Karma
0
It works now, thank you very much!
aseques
Registered Member
Posts
63
Karma
0
I just found the same issue using the 5.0.3 appimage, would't it make sense to add a python3 in the script interpreter list (it seems it will still take time until it's the default everywhere)? Shall I open a bug?
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
The list allows typing, so you can just type "python3". I think "python" is fine ... people with multiple versions can just add the "3", don't you think? Better than cluttering the list with "python2" "python3" "python" "ruby" "ruby2" "ruby2.2" "php" "php6" ...


I'm working on the KDevelop IDE.
aseques
Registered Member
Posts
63
Karma
0
Yes, might be, since I come from using another IDE (pycharm) I remember getting the same issue on the first install, in that case there was a choice of the two versions (defaulting to v2 too), since the UI was mentioning the python version I avoided having to search the web for a solution (not a big deal though)
Another option would be to add the version written between parenthesis so the user would notice the version he's using.

This is what I was offered on the other IDE
Image
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
The stupid thing is that it's not even so trivial, I can't know whether on your system "python" is python2 or python3 without actually executing "python --version" and parsing the output, i.e. this requires adding program logic, not just changing the presentation. Fiddling that into this dialog in a way which also works for the other languages didn't seem worth it for me (although of course it's not super hard to do).


I'm working on the KDevelop IDE.
aseques
Registered Member
Posts
63
Karma
0
I see, well it's just a novice issue, overall I am enjoying the 5.0.3 a lot, thanks for your job
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
Hmm, as just noted on IRC, I think we can just change it to "python3". I'll do that for 5.1.


I'm working on the KDevelop IDE.
aseques
Registered Member
Posts
63
Karma
0
Oh, that would be great :D
User avatar
firef
Registered Member
Posts
25
Karma
0
OS

Re: Python3 - unsupported interpreter

Sun Sep 24, 2017 12:24 am
scummos wrote:The list allows typing, so you can just type "python3". I think "python" is fine ... people with multiple versions can just add the "3", don't you think? Better than cluttering the list with "python2" "python3" "python" "ruby" "ruby2" "ruby2.2" "php" "php6" ...


No, I don't think that. It is unhelpful and unsupportive for unexperienced users. Following that line, why don't we drop the "launch app" icon, since a user can always type sth. into KRunner ... >:D o) >:D


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]