虚拟主机
我们将首先激活虚拟环境,然后运行pip install ...来安装用于虚拟环境的软件包。
见文档,https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/
source env/bin/activate但是pipenv是不同的。
pipenv
至于pipenv,这里的说明,Please explain the usage of Pipfile and Pipfile.lock
在激活虚拟环境之前,
pipenv install在项目文件夹中安装软件包。pipenv shell来激活虚拟环境。换句话说,使用virtualenv首先创建/激活虚拟环境,然后在虚拟环境中创建/激活pip install ...包。但是使用pipenv,我们首先使用pipenv install ...在项目文件夹中安装包,然后使用pipenv shell激活环境。
这是正确的吗?
发布于 2019-07-11 19:52:03
呃基本上是的。
Virtualenv更改当前shell中的环境,您可以使用deactivate撤销该环境,而pipenv shell则创建一个新的shell,您需要在完成后退出它。
https://stackoverflow.com/questions/56551477
复制相似问题