Setting --no-site-packages as default another newbe question.

34 views
Skip to first unread message

Tom Brander

unread,
Apr 29, 2013, 12:28:34 PM4/29/13
to virtuale...@googlegroups.com
I ran the following from my shell command prompt, will this set no-site packages for all new virtual env's? how can I verify that it has taken effect, I don't know what the export does or how it stores the result for subsequent sessions?? (using 4.0 now)

 export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'

Erik Bray

unread,
Apr 29, 2013, 1:50:52 PM4/29/13
to virtuale...@googlegroups.com
On Mon, Apr 29, 2013 at 12:28 PM, Tom Brander <tombr...@gmail.com> wrote:
> I ran the following from my shell command prompt, will this set no-site
> packages for all new virtual env's? how can I verify that it has taken
> effect, I don't know what the export does or how it stores the result for
> subsequent sessions?? (using 4.0 now)

You could verify that it works by making a virtualenv and verifying
that it can't import anything you have installed in site-packages. It
won't be saved for subsequent sessions because it's just an
environment variable.

If you want that to be your default (note: that *is* the default
already for current versions of virtualenv) I would recommend instead
putting that setting in your virtualenv.ini:

http://www.virtualenv.org/en/latest/#environment-variables-and-configuration-files

In mine I have

[virtualenv]
distribute = True
system-site-packages = False

Tom Brander

unread,
Apr 30, 2013, 2:02:24 PM4/30/13
to virtuale...@googlegroups.com
thanks, set same...
Reply all
Reply to author
Forward
0 new messages