can I nest virtualenvs?

2020-06-01 06:47发布

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.

2条回答
一纸荒年 Trace。
2楼-- · 2020-06-01 07:02

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.

查看更多
Root(大扎)
3楼-- · 2020-06-01 07:03

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

查看更多
登录 后发表回答