Ask Your Question
1

Restarting Python Shell not working with pyenv

asked 2022-11-03 21:37:46 -0600

PeterWolf's avatar

updated 2022-11-04 07:56:11 -0600

Hi,

I am trying to use pyenv with WingIDE Pro 7. I've used

import sys
print(sys.executable)

and get the python executable path as

/home/dtnlp/.pyenv/versions/vPy36/bin/python

Then, I open the Project Properties dialog window and chose [Command Line] to put the executable python path in it.

After resting the Python Shell tab from [Options], it still gives me this message:

Cannot execute: use Options -> restart Shell to launch shell [Needs restart for Python env]

I've repeated the steps many times, but still cannot get my Python Shell working under WingIDE.

Please kindly advise what I can do. Many many thanks in advance. :)

-- Peter. w

edit retag flag offensive close merge delete

Comments

Could you please try setting the Debugger > Diagnostics > Python Shell Debug Log preference, restarting the Python Shell from its Options menu, and sending the log to support@wingware.com? Please don't set the Extremely Verbose option, though.

Wingware Support's avatar Wingware Support  ( 2022-11-04 09:01:44 -0600 )edit

I managed to replicate this here. Will add an answer...

Wingware Support's avatar Wingware Support  ( 2022-11-04 10:55:47 -0600 )edit

Also, the diagnostic log is not produced because the crash is early in Python's startup. So no need to try to obtain that.

Wingware Support's avatar Wingware Support  ( 2022-11-04 11:04:22 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2022-11-05 05:46:31 -0600

PeterWolf's avatar

Hello, thanks for the test and reply.

I've managed to figured out a solution. I installed the Python 3.6.15, in my case, using clang:

$ sudo apt install clang -y
$ CC=clang pyenv install 3.6.15

Then everything works fine now.

We are planning to migrate to Python 3.9 or Python3.11 in 2023, and we are evaluating WingIDE 9. Meanwhile, there are dozens of website built under Python3.6.

edit flag offensive delete link more

Comments

Great, thanks for figuring this out and posting the solution!

Wingware Support's avatar Wingware Support  ( 2022-11-05 10:08:17 -0600 )edit
0

answered 2022-11-04 11:00:16 -0600

It looks like Python 3.6.15 as installed by pyenv segfaults randomly. It also crashes on the command line for me if I try to create a virtualenv. I'm not sure of the reason for this, but I'd recommend just using a newer version of Python. I didn't run into any problems with Python 3.11.0.

My environment when testing this was: Ubuntu 22.04, pyenv 2.3.6 installed from https://pyenv.run, Wing 9.0.0.5.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2022-11-03 21:37:46 -0600

Seen: 44 times

Last updated: Nov 05