How to remove a virtualenv created by “pipenv run”

2019-02-02 20:02发布

I am learning Python. In one of my small projects I ran

pipenv run python myproject.py

and it created a virtualenv for me in C:\Users\USERNAME\.virtualenvs

I found it also created or modified some files under my project source code directory. I am just wondering how to cleanly delete this virtualenv and reverse my project back to a no-virtualenv state.

I am using python 3.6.4, and PyCharm.

标签: pipenv
2条回答
Luminary・发光体
2楼-- · 2019-02-02 20:16

I googled a lot and finally I just manually deleted the relevant virtualenv folder and the associated Pipfile.

查看更多
欢心
3楼-- · 2019-02-02 20:36

You can run the pipenv command with the --rm option as in:

pipenv --rm

This will remove the virtualenv created for you under ~/.virtualenvs

See https://docs.pipenv.org/#cmdoption-pipenv-rm

查看更多
登录 后发表回答