Using virtualenv with Wing

asked 2017-07-18 08:54:00 -0600

David Poundall gravatar image

updated 2019-03-13 09:43:02 -0600

I am looking to partition my projects by running virtualenv.  For those who don't know, virtualenv creates a clean copy of any chosen python on your system, within the folder of your project.   My thinking from here is that all I need to do is point wing at the project Python installed by virtualenv and all should work from there.

I set the Python executable to custom and enter the path as .../Users/dgp/Library/Mobile Documents/com~apple~CloudDocs/02-Python Projects/02-PP02/BBH_MachineLearning/bin/Python3.6

Just for good measure I set the Python Path to Custom and entered this .../Users/dgp/Library/Mobile Documents/com~apple~CloudDocs/02-Python Projects/02-PP02/BBH_MachineLearning/binWhen I clicked OK to move back to the project I get this...

Some values are invalid:

  • Python executable '/Users/dgp/Library/Mobile Documents/com/Users/dgpapple/Users/dgpCloudDocs/02-Python Projects/02-PP02/BBH_MachineLearning/bin/Python3.6' was not found. It should be the name of a Python interpreter that is on your PATH (such as python, python3.4, python.exe) or the full path to the Python interpreter you wish to use.

Some warnings were also encountered:

  • PYTHONPATH entry '/Users/dgp/Library/Mobile Documents/com/Users/dgpapple/Users/dgpCloudDocs/02-Python Projects/02-PP02/BBH_MachineLearning/bin' does not exist or cannot be found

Please correct the values and try again

It looks like the tilda's in the apple cloud path are confusing wing.  Are there any escape codes I could use in the path that would enable what i am trying to do to work?

Thanks in advance

edit retag flag offensive close merge delete

Comments

Could you check to be sure the pathnames are correct by running python3.6 in the terminal?  Wing may be having problems with the ~ characters -- which can be used to specify the home directory.  If this is the problem, the workaround may be to create a symbolic link to the BBH_MachineLearning directory.  Note that setting python path to custom is not needed here.

Wingware Support gravatar imageWingware Support ( 2017-07-18 09:59:00 -0600 )edit

OK I get a file for results and it continas the same thing as the Testing window: run_unittests_xml.py: error: unrecognized arguments: --directory=/home/odile/Documents/dev_logiciels/Softknit21/tests/storage --output-fd=17

and in the debug window I have : usage: run_unittests_xml.py [-h] [-v] [-q] [--locals] [-f] [-c] [-b] [tests [tests ...]] run_unittests_xml.py: error: unrecognized arguments: --directory=/home/odile/Documents/dev_logiciels/Softknit21/tests/model --no-xml

piscvau gravatar imagepiscvau ( 2019-06-28 06:50:15 -0600 )edit

What version of Wing do you have? I'm wondering if this is something we've fixed since there was an issue w/ arguments at one point.

Also, how is this related to this question from 2017? If posted in wrong question, can you please repost and remove this?

Wingware Support gravatar imageWingware Support ( 2019-06-28 07:54:05 -0600 )edit