0

The python interpreter "/usr/bin/python2.7" may not exist.

I can't tell my situation well because i am not native english speaker...Could not launch debugger for "/home/shun/opencv-sample01.py". The python interpreter "/usr/bin/python2.7" may not exist.has shown. Debugger and python code could not start. How to avoid this situation?

Wing Personal - 6.1.1-1 (rev e1bf75077d3c) - /usr/local/lib/wingide-personal6.1
Linux version 4.14.74-1-MANJARO (builduser@development) (gcc version 8.2.1 20180831 (GCC)) #1 SMP PREEMPT Fri Oct 5 14:16:52 UTC 2018
[shun@storm ~]$ which python
/usr/bin/python
[shun@storm ~]$ python -VPython 
3.7.0

This is problem but I don't know how to change them. But...

[shun@storm ~]$ ls -al /usr/bin/python*
lrwxrwxrwx 1 root root 7 9月 16 04:13 /usr/bin/python -> python3
lrwxrwxrwx 1 root root 14 9月 16 04:13 /usr/bin/python-config -> python3-config
lrwxrwxrwx 1 root root 9 6月 27 22:05 /usr/bin/python2 -> python2.7
lrwxrwxrwx 1 root root 16 6月 27 22:05 /usr/bin/python2-config -> python2.7-config
-rwxr-xr-x 1 root root 5920 6月 27 22:05 /usr/bin/python2.7
-rwxr-xr-x 1 root root 1681 6月 27 22:05 /usr/bin/python2.7-config
lrwxrwxrwx 1 root root 9 9月 16 04:13 /usr/bin/python3 -> python3.7
lrwxrwxrwx 1 root root 16 9月 16 04:13 /usr/bin/python3-config -> python3.7-config
-rwxr-xr-x 2 root root 14112 9月 16 04:13 /usr/bin/python3.7
lrwxrwxrwx 1 root root 17 9月 16 04:13 /usr/bin/python3.7-config -> python3.7m-config
-rwxr-xr-x 2 root root 14112 9月 16 04:13 /usr/bin/python3.7m
-rwxr-xr-x 1 root root 3222 9月 16 04:13 /usr/bin/python3.7m-config

END OF LINE
Shun's avatar
1
Shun
asked 2018-10-12 09:14:00 -0500
Wingware Support's avatar
4k
Wingware Support
updated 2019-03-13 10:22:40 -0500
edit flag offensive 0 remove flag close merge delete

Comments

PS. Some of more images. Now I remember that I see this when launching Wing IDE. Sorry for less information! END OF LINE

Shun's avatar Shun (2018-10-12 10:11:00 -0500) edit
add a comment see more comments

1 Answer

0

You need to click Custom for Python Executable in the Project Properties dialog so it uses the custom value shown there and not the default.  We continue to store the custom value even when Default is clicked (but disable / grey it out) so it's easier to switch back and forth for people that need to do that.

However, since the default /usr/bin/python2.7 does exist it may be there is some other problem with that installation of Python.  For example, perhaps it's 32-bit Python which Wing 6 no longer supports on Linux.  If you change to /usr/bin/python3.7 and that's 64-bit it'll solve it.

If not, please send in a bug report from Wing's Help menu and include the error log where prompted and that likely will tell us why it's failing to launch debug.

Wingware Support's avatar
4k
Wingware Support
answered 2018-10-12 09:23:00 -0500
Wingware Admin's avatar
231
Wingware Admin
updated 2019-03-06 22:39:42 -0500
edit flag offensive 0 remove flag delete link

Comments

Thank you this reply. (Wow! Its very fast!) First, these python's are 64bit binary. and using with wingide-personal-6.1.1-1-x86_64-linux.

[shun@storm ~]$ file /usr/bin/python2.7
/usr/bin/python2.7: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID [sha1]=25b8495c3e8fee45f04b8bcdcf4aeb785fd80f0f, stripped
[shun@storm ~]$ file /usr/bin/python3.7
/usr/bin/python3.7: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=03feffd3fe8261f1b052585fd7ec9503ab1a3631, stripped

Second, My uploaded PNG as last one is no good for see detail. I will add more PNG file.It means that I tried changing to Custom value but another error has occurred.

Shun's avatar Shun (2018-10-12 09:59:00 -0500) edit

I could see the last png well enough to understand what the text says.  Good to rule out that it's not 32-bit.  If you try to Restart Shell from the Options menu in the Python Shell tool in Wing, does it show any details of why it's failing to start Python?

Wingware Support's avatar Wingware Support (2018-10-12 10:09:00 -0500) edit

Thanks. Now I Restart Shell from pull down menu.

Could not start shell process: Could not start debug process::Could not launch debugger for "/usr/local/lib/wingide-personal6.1/src/debug/tserver/_sandbox.py". The python interpreter "/usr/bin/python3.7" may not exist.

and

Could not launch debugger for "/usr/local/lib/wingide-personal6.1/src/debug/tserver/_sandbox.py". The python interpreter "/usr/bin/python3.7" may not exist.
Shun's avatar Shun (2018-10-12 10:18:00 -0500) edit

Try setting WINGDB_PRINT_ALL_TRACEBACKS=1 in the Environment in Wing's Project Properties after selecting over to "Add to inherited environment" in the drop-down menu there, and then restart the shell again.  That should print some additional diagnostics.  Sorry, I thought it would already do that on its own but I think it's needed to rule out whether it's entirely failing to start Python vs. failing to initiate debug/etc.

Wingware Support's avatar Wingware Support (2018-10-12 10:25:00 -0500) edit

Also, sending us ~/.wingide6/ide.log may show us what is wrong (or look in the file yourself after trying to start debug or restart the Python Shell)

Wingware Support's avatar Wingware Support (2018-10-12 10:29:00 -0500) edit

Thank you. I send ide.log by Wing's help now.

Shun's avatar Shun (2018-10-12 10:33:00 -0500) edit

I tried with WINGDB_PRINT_ALL_TRACEBACKS=1. Here is output but looks similar as I posted.Debugger: Could not start debug process::Could not launch debugger for "/usr/local/lib/wingide-personal6.1/src/debug/tserver/_sandbox.py". The python interpreter "/usr/bin/python3.7" may not exist.Debugger: Python Shell Could Not Start::Could not start shell process: Could not start debug process::Could not launch debugger for "/usr/local/lib/wingide-personal6.1/src/debug/tserver/_sandbox.py". The python interpreter "/usr/bin/python3.7" may not exist.END OF LINE

Shun's avatar Shun (2018-10-12 10:38:00 -0500) edit

Apparently we launch /usr/bin/python3.7 and it does nothing, prints no output, and fails to launch within 4 seconds.  Does running that outside of Wing start Python successfully in less than 4 seconds? From the log it looks like the computer is plenty fast, but maybe something is slowing things down a lot.

Wingware Support's avatar Wingware Support (2018-10-12 11:03:00 -0500) edit

Hmm. Perhaps I need rebuild my environment or cheking hardware... Give me time for investigate.Thanks for nice support to me.[shun@storm .wingpersonal6]$ time python3.7 -VPython 3.7.0real 0m0.008suser 0m0.006ssys 0m0.003s[shun@storm .wingpersonal6]$ time wing-personal6.1 &[1] 1582[shun@storm .wingpersonal6]$ ICE default IO error handler doing an exit(), pid = 1583, errno = 32real 1m14.136suser 1m9.924ssys 0m6.136s

Shun's avatar Shun (2018-10-12 12:09:00 -0500) edit

I think -V exits Python much earlier than starting it w/ a file and doesn't load anything so you may want to try:time python3.7 somefile.pyWhere somefile.py just contains "print('hello')".

Wingware Support's avatar Wingware Support (2018-10-12 12:56:00 -0500) edit

Good morning. I tried with your kind advice.[shun@storm ~]$ cat somefile.py print('hello')[shun@storm ~]$ time python3.7 somefile.py helloreal 0m0.040suser 0m0.037ssys 0m0.003s[shun@storm ~]$ time for i in {1..11} ; do python3.7 somefile.py ; donehellohellohellohellohellohellohellohellohellohellohelloreal 0m0.441suser 0m0.356ssys 0m0.086sEND OF LINE

Shun's avatar Shun (2018-10-12 20:56:00 -0500) edit

The only other thing I can think of is whether there's something blocking Wing from launching sub-processes... clearly Python is working but for some reason Wing can't launch it. Seems unlikely on Linux to have that sort of anti-virus blocking of functionality but I don't have any other ideas of what it could be.

Wingware Support's avatar Wingware Support (2018-10-12 22:26:00 -0500) edit

Ok. I'll try to rebuild my environment include OSs. Thanks to your kindly support.END OF LINE

Shun's avatar Shun (2018-10-12 23:26:00 -0500) edit
add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer