python - How to check whether virtualenv was created with '--no-site-packages'? -



python - How to check whether virtualenv was created with '--no-site-packages'? -

sometimes errors suspect result of django app using globally installed python modules/django apps instead of within virtualenv.

is there way check whether app's virtualenv created '--no-site-packages' without having delete it, re-create follows?

deactivate rmvirtualenv my_env mkvirtualenv my_env --no-site-packages workon my_env pip install -r requirements.txt

surely there must improve way! thanks.

there's file in <env>/lib/pythonx.x/ called no-global-site-packages.txt when create virtual environment --no-site-packages.

just tried virtualenv 1.7:

% virtualenv --no-site-packages env.without % virtualenv --system-site-packages env.with % find env.without | sed 's/env.without//' > files.without % find env.with | sed 's/env.with//' > files.with % diff files.with* 230a231 > /lib/python3.2/no-global-site-packages.txt

python django virtualenv pip virtualenvwrapper

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -