2

I accidentally installed a requirements.txt file without being in a virtual environment.

I am running MacOS version 10.12.6. I have already tried to create a txt doc of all the packages then remove them via these commands.

pip freeze > requirements.txt

pip uninstall -r requirements.txt

However, when I run these commands I get this error:

ERROR: Cannot uninstall 'appnope'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

These are the packages I would like to remove for reference:

Package          Version  
---------------- ---------
appnope          0.1.0    
appscript        1.0.1    
boto             2.49.0   
certifi          2019.6.16
docutils         0.14     
entrypoints      0.3      
gmpy2            2.0.8    
heapdict         1.0.0    
imageio          2.5.0    
ipython-genutils 0.2.0    
llvmlite         0.29.0   
locket           0.2.0    
mpmath           1.1.0    
ptyprocess       0.6.0    
pycosat          0.6.3    
pycrypto         2.6.1    
pycurl           7.43.0.3 
PyYAML           5.1.1    
ruamel-yaml      0.15.46  
setuptools       41.0.1   
terminado        0.8.2    
wheel            0.33.4   

What would be a viable solution for removing these packages? I have already tried to remove them individually through pip uninstall [package-name] but I receive the same error for each package.

Hakeem
  • 21
  • 5
  • 1
    Check out https://stackoverflow.com/questions/53807511/pip-cannot-uninstall-package-it-is-a-distutils-installed-project. The viable solution is to uninstall it using the tool you used to install it in the first place; the package wasn't installed with `pip`. If you used the old and unmanageable way (`python setup.py install`), check out https://stackoverflow.com/questions/1550226/python-setup-py-uninstall – hoefling Aug 03 '19 at 09:23

0 Answers0