要为python项目创建pipenv,我首先创建了一个项目文件夹,并进入该文件夹,指示pipenv创建Pipfile、Pipfile.lock和相关的虚拟环境,如下所示:
$ mkdir Project
$ cd Project
$ pipenv --three
Creating a virtualenv for this project…
Using /usr/bin/python3 (3.5.2) to create virtualenv…
⠋Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in ~/.local/share/virtualenvs/Projects-jrsJaPdI/bin/python3
Also creating executable in ~/.local/share/virtualenvs/Projects-jrsJaPdI/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: ~/.local/share/virtualenvs/Projects-jrsJaPdI
Creating a Pipfile for this project…
$
$ pipenv install --dev
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (711973)!
Installing dependencies from Pipfile.lock (711973)…
▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
To activate this project's virtualenv, run the following:
$ pipenv shell是删除pipenv创建的所有内容的正确方法,只需在非pipenv shell模式下在项目目录中执行以下操作:
$ pipenv --rm
$ rm Pipfil*这意味着我必须先删除项目文件夹的虚拟环境,然后再删除Pipfile和Pipfile.lock?
发布于 2020-05-15 16:41:32
我们在这里:
# Removing venv directory ...
$ pipenv --rm
# ... and Pipfile, Pipfile.lock
$ rm Pipfile*
# Strange that deleted venv still activated, so exit from it.
$ exit发布于 2018-04-19 06:10:47
是的,这些是删除pipenv工件的正确指令。
要完全撤消示例中显示的所有内容,您需要继续执行以下操作:
$ cd ..
$ rm -rf Projecthttps://stackoverflow.com/questions/49792994
复制相似问题