简体   繁体   中英

Remove virtual environment with virtualenvwrapper-win

I'm trying out virtualenvwrapper-win (on Windows 7), everything works as it should, but when I try to remove virtual environments with rmvirtualenv command I am getting this output:

> rmvirtualenv env_py3
The directory is not empty.

Deleted C:\Users\User1\Envs\env_py3

And the directory (env_py3) contains just one file: pip-selfcheck.json. How do I fix it without deleting all the directories manually?

This may be a bit hacky, but you can modify the rmvirtualenv.bat script to include this line:

REM Hack to remove pip-selfcheck.json
if exist ".\pip-selfcheck.json" ( del ".\pip-selfcheck.json" )

I put it right after the call folder_delete.bat line.

rmvirtualenv will deactivate the virtualenv for you. The problem you're describing ( https://github.com/davidmarble/virtualenvwrapper-win/issues/78 ) has since been fixed.

您可以简单地将其删除为

rmvirtualenv <name>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM