Specifying Environment for the Remote Python

Index of All Documentation » Wing Pro Reference Manual » Project Manager » Remote Hosts »

Wing uses any Environment you specify in Project Properties to execute, debug, or test your code. But this environment cannot be used when running the remote agent, since it is started in the environment provided by ssh or plink.exe.

As a result, if the Python installation on your remote host needs certain environment variables in order to run, it may fail to start when Wing attempts to run the remote agent with it.

To work around this, create a shell script that sets the necessary environment and starts up Python. For example, if your Python needs PYTHONHOME and PYTHONPATH to be set you might write something like this:

export PYTHONPATH=/lib/python2.7
python $*

Then chmod +x the above script so it is executable and set the Python Executable in your remote host configuration to its full path.