Andrea Zonca
Andrea Zonca

Reputation: 8773

can I nest virtualenvs?

is it possible to nest 2 virtualenvs?

I would like to have a base virtualenv and then a more specific virtualenv that accesses all the packages from the base virtualenv and then has its own.

Any hint appreciated, thanks.

Upvotes: 18

Views: 4052

Answers (2)

sortega
sortega

Reputation: 1158

You can run in trouble when running python scripts of a virtualenv as subprocesses of another virtualenv. I've found useful to remove from the environment of the subprocess PYTHONPATH and BUILDOUT_ORIGINAL_PYTHONPATH.

Upvotes: 1

ire_and_curses
ire_and_curses

Reputation: 70202

No, this isn't currently possible. There is a feature request and a patch for the functionality out there though:

https://github.com/pypa/virtualenv/issues/33

Upvotes: 5

Related Questions