Ask Your Question

How do I set identify the executable for a virtual environment and use this in Wing?

asked 2017-03-03 12:16:00 -0500

Steven C. Howell gravatar image

updated 2019-03-13 10:20:26 -0500

After creating and configuring a Python environment from the command line, e.g., using conda, how would I use this environment in Wing? 

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted

answered 2017-03-03 12:20:00 -0500

Steven C. Howell gravatar image

updated 2019-03-07 07:04:44 -0500

Wingware Admin gravatar image
  1. Run the interpreter for your virtual environment outside of Wing.

  2. From that interpreter, you can identify the executable for the environment by running the commands: 

    import sys print(sys.executable)

3. From Wing, open the Project Properties dialog.

  1. Set the Python Executable to be the output from the sys.executable command.
edit flag offensive delete link more


Note that in Wing 101 there are no Project Properties so this is set instead in the Configure Python dialog, from the Edit menu.

Wingware Support gravatar imageWingware Support ( 2017-03-03 12:52:00 -0500 )edit

answered 2019-04-09 10:48:52 -0500

chukwudi.nwachukwu gravatar image

updated 2019-04-10 06:27:11 -0500

What about working with a remote host configuration, via SSH?

import sys; print(sys.executable)

gives me


But the Python shell that is connected by SSH gives me


I basically want to use the one that is from the virtualenv. How do I go about it? Please note that I tried setting it as instructed above but it did not work.

edit flag offensive delete link more


If you are using a remote host from within Wing, you'd enter /home/ichux/wingpro/venv-django2.2/bin/python for the Python Executable in the remote host configuration

Wingware Support gravatar imageWingware Support ( 2019-04-09 13:35:53 -0500 )edit

It worked! Thanks so much. I had initially tried it but it failed for reasons I can't explain.

chukwudi.nwachukwu gravatar imagechukwudi.nwachukwu ( 2019-04-10 05:03:09 -0500 )edit

answered 2017-03-09 13:57:00 -0500

Jeffrey Vahue gravatar image

One thing to note is if you switch active projects and switch from a 2.7 project to a 3.3 project the python shell does not automatically switch from 2.7 to 3.3, you have to manually ask it to restart the shell - so if you have not done that and you check the shell to see the Python version it might be wrong.

edit flag offensive delete link more


But also note that in Wing 7 it will now auto-restart the shell when you switch projects. This can be disabled from the Python Shell's Options menu.

Wingware Support gravatar imageWingware Support ( 2019-04-10 06:29:54 -0500 )edit

Your Answer

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

Add Answer

Question Tools



Asked: 2017-03-03 12:16:00 -0500

Seen: 1,501 times

Last updated: Apr 10