0

I'm on a mac, and I know that any package I install goes to a specific folder in something like /Library/....

Now when I create a virtual environment, will it create a folder structure to store any libs underneath the virtual environment to isolate things?

e.g.

/home/user/mypythonvirtenv
/home/user/mypythonvirtenv/python2.6/....

Does it re-map the python environmental variables temporarily also?

asked Sep 10, 2010 at 3:17

1 Answer 1

2

Yes. Virtualenv will make you a directory tree that looks like:

mypythonvirtualenv/bin
mypythonvirtualenv/include
mypythonvirtualenv/lib
mypythonvirtualenv/lib/python2.6
mypythonvirtualenv/lib/python2.6/site-packages

When you want to use it, you source the activate script:

euclid:~ seth$ which python
/opt/local/bin/python
euclid:~ seth$ source /Users/seth/mypythonvirtualenv/bin/activate
(mypythonvirtualenv)euclid:~ seth$ which python
/Users/seth/mypythonvirtualenv/bin/python

Other python related stuff (such as easy_install) will also work the "right" way.

answered Sep 10, 2010 at 4:37
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.