First time here? Check out the FAQ!
1

Using virtualenv with Wing

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

David Poundall's avatar
15
David Poundall
asked 2017-07-18 08:54:00 -0500
Wingware Support's avatar
4k
Wingware Support
updated 2019-03-13 09:43:02 -0500
edit flag offensive 0 remove flag 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's avatar Wingware Support (2017-07-18 09:59:00 -0500) edit

Sorry, I'm not used to work with forum. Yes it is a duplicate of the question above. I didn't realized it was an other question when i wrote it this morning.

skirando's avatar skirando (2020-05-20 15:26:58 -0500) edit
add a comment see more comments

1 Answer

0

Note that Wing 7.2 adds additional support for using virtualenv with Wing, by adding "Activated Env" option for Python Executable, which can be set to the command that activates the env, and also allowing creation of new virtualenvs during project creating with New Project from the Project menu.

Wingware Support's avatar
4k
Wingware Support
answered 2020-01-22 20:01:50 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer