I’ve found this snippet as an alternative solution. It’s a more graceful removal of libraries than remaking the virtualenv:
pip freeze | xargs pip uninstall -y
In case you have packages installed via VCS, you need to exclude those lines and remove the packages manually (elevated from the comments below):
pip freeze | grep -v "^-e" | xargs pip uninstall -y
Related Posts:
- How do I update\upgrade pip itself from inside my virtual environment?
- How do I update\upgrade pip itself from inside my virtual environment?
- How to uninstall a package installed with pip install –user
- Where does pip install its packages?
- Where does pip install its packages?
- Updating matplotlib in virtualenv with pip
- No module named pkg_resources
- What is the purpose of “pip install –user …”?
- pip install -r requirements.txt [Errno 2] No such file or directory: ‘requirements.txt’
- ImportError: No module named Crypto.Cipher
- How to install pip with Python 3?
- How do I update\upgrade pip itself from inside my virtual environment?
- How to update/upgrade a package using pip?
- bash: pip: command not found
- How can I install packages using pip according to the requirements.txt file from a local directory?
- ImportError: No module named pip
- ImportError: No module named pip
- How do I install pip on macOS or OS X?
- How can I install pip on Windows?
- ImportError: No module named tensorflow
- What is setup.py?
- Where is BeautifulSoup4 hiding?
- What is __init__.py for?
- What is __init__.py for?
- Using Python 3 in virtualenv
- How to install python3 version of package via pip on Ubuntu?
- Could not install packages due to an EnvironmentError:
- Could not find a version that satisfies the requirement tensorflow
- “Defaulting to user installation because normal site-packages is not writeable” python message
- Could not find a version that satisfies the requirement tensorflow
- How to install pytorch in Anaconda with conda or pip?
- Can’t fix “zipimport.ZipImportError: can’t decompress data; zlib not available” when I type in “python3.6 get-pip.py”
- Configuring so that pip install can work from github
- import opencv vs import cv2
- No module named ‘psycopg2’
- How to activate an Anaconda environment
- How to pip or easy_install tkinter on Windows
- Conda uninstall one package and one package only
- Error after upgrading pip: cannot import name ‘main’
- filename.whl is not supported wheel on this platform
- No acceptable C compiler found in $PATH when installing python
- Permission denied error by installing matplotlib
- ImportError: cannot import name main when running pip –version command in windows7 32 bit
- filename.whl is not a supported wheel on this platform
- What is the difference between pip and conda?
- bash: pip: command not found
- How to know the version of pip itself
- How to import other Python files?
- How to activate virtualenv in Linux?
- How to install pip3 on Windows?
- “ImportError: no module named ‘requests'” after installing with pip
- How do I install the yaml package for Python?
- ModuleNotFoundError: No module named ‘matplotlib’
- error: Unable to find vcvarsall.bat
- error: Unable to find vcvarsall.bat
- AttributeError: Module Pip has no attribute ‘main’
- pg_config executable not found
- Can I force pip to reinstall the current version?
- How can I install Python’s pip3 on my Mac?
- Removing pip’s cache?
- setup script exited with error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1
- Could not find a version that satisfies the requirement
- ImportError: No module named ‘encodings’
- How to upgrade all Python packages with pip
- How do I remove all packages installed by PIP?
- How to leave/exit/deactivate a Python virtualenv
- How to get pip to work behind a proxy server
- ‘pip3’ is not recognized as an internal or external command, operable program or batch file
- using pip3: module “importlib._bootstrap” has no attribute “SourceFileLoader”
- PyLint “Unable to import” error – how to set PYTHONPATH?
- Using Pip to install packages to Anaconda Environment
- How to install multiple python packages at once using pip
- How are Pipfile and Pipfile.lock used?
- Checking whether pip is installed?
- AttributeError: Module Pip has no attribute ‘main’
- pg_config executable not found
- ‘Pip’ is Not Recognized as an Internal or External Command windows 10 CMD
- How to reinstall a pip package even if it exists
- How can I install Python’s pip3 on my Mac?
- No module named “Torch”
- What is the difference between venv, pyvenv, pyenv, virtualenv, virtualenvwrapper, pipenv, etc?
- Why does “pip install” inside Python raise a SyntaxError?
- clang error: unknown argument: ‘-mno-fused-madd’ (python package installation failure)
- Virtualenv Command Not Found
- ‘pip install’ fails for every package (“Could not find a version that satisfies the requirement”) [duplicate]
- How do I install a pip package globally instead of locally?
- python mpl_toolkits installation issue
- Pipenv: Command Not Found
- Pip – Fatal error in launcher: Unable to create process using ‘”‘
- python pip on Windows – command ‘cl.exe’ failed
- pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available
- pip: no module named _internal
- Zsh: Conda/Pip installs command not found
- ImportError: No module named ‘yaml’
- pip connection failure: cannot fetch index base URL http://pypi.python.org/simple/
- Find which version of package is installed with pip
- How to run Pip commands from CMD
- How to install PyGame on Python 3.4?
- Django Rest Framework — no module named rest_framework
- bash: mkvirtualenv: command not found