有没有一种方法可以使用virtualenv / virtualenvwrapper在特定目录(即当前目录)中创建虚拟环境文件夹,而不是默认的目录(即WORKON_HOME
)。
类似于以下内容:
$ python -m venv env # this creates the folder `env` in the current path
有没有一种方法可以使用virtualenv / virtualenvwrapper在特定目录(即当前目录)中创建虚拟环境文件夹,而不是默认的目录(即WORKON_HOME
)。
类似于以下内容:
$ python -m venv env # this creates the folder `env` in the current path
virtualenv
- 是的:只需执行virtualenv env
或virtualenv /path/to/env
- phdvirtualenvwrapper
— 不行;virtualenvwrapper
的整个理念就是在一个中心位置管理虚拟环境。 - phdvirtualenvwrapper
背后的原理。 - floatingpurrvirtualenvwrapper
-- 是的:你可以将WORKON_HOME
设置为另一个目录,并在那里创建环境。之后你也可以将其设置回来。使用一些 bash 别名很容易管理。 - anilbey