### Wing under Enthought Deployment Manager EDM

85
views
1
10 weeks ago by

How do I get Wing to run under an Enthought Deployment Manager (EDM) context?

Background: we (our company) do our development under edm, which sets up its own Python installation. When I develop under Spyder, startup looks like this

$which python /usr/bin/python$ edm shell -e edm1
Starting new shell in EDM environment 'edm1'.
Type 'exit' or 'Ctrl+D' to return.
$which python /Users/smithd91/.edm/envs/edm1/bin/python$ spyder &

Now Spyder inherits the new Python location.  I just installed Wing (on a Mac), and it fired up directly, without the mediation of the shell. Looking at the sys.path, I see
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
etc., which is yet another Python location.

How do I get Wing to use the Python environment set by EDM?

Community: Wing Python IDE

1
10 weeks ago by
In place of spyder just launch wing the same way.
I use this alias to make it easier on a mac.  alias wg='/Applications//WingIDE.app/Contents/Resources/wing'
If you are on linux, then something similar will work.
Wing will use the default python if you don't specify a python in the project settings.
I use many different virtualenvs so I never specify a python in my wing projects
I like this solution, as it will work when you switch off among EDM environments.
written 10 weeks ago by David Smith
This requires restarting Wing with each change in env, while setting Python Executable in Project Properties lets you just switch projects.  But either should work.
written 10 weeks ago by Wingware Support
1
10 weeks ago by
Could you try setting the Python Executable in the Project Properties dialog to /Users/smithd91/.edm/envs/edm1/bin/python ?  This is how virtual environments are supported.
Yes, it looks like that worked. I tried it and didn't think it worked because it didn't change the path in my python shell. But then I quit Wing and restarted, and the EDM installation now shows in the path. Thank you.
written 10 weeks ago by David Smith