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

306
views
1
8 months ago by

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

Community: Wing Python IDE

3
8 months ago by

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.

4. Set the Python Executable to be the output from the

sys.executable

command.

1

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

written 8 months ago by Wingware Support
1
8 months ago by

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.