The problem:
I have installed Anaconda:
conda -V conda 4.4.7
Also I installed a lot of packages for it using python3 setup.py install
. I used it for some packages created from setup.py
files.
Now I want to uninstall one package.
What I tried:
pip uninstall packageName pip3 uninstall packageName conda uninstall packageName
It works for python: check pip list
and pip3 list
and there isn't such package.
Error:
But for conda I got this:
conda uninstall packageName Solving environment: failed PackagesNotFoundError: The following packages are missing from the target environment: - packageName
Let's check:
conda list packageName
P.S. I found info that conda uninstall
and conda remove
doesn't work in this case. But what to do then?
P.S.S. Actually I changed real package name at packageName
but if this information is important I will add it.
My info:
conda info active environment : None user config file : /home/masamok4/.condarc populated config files : /home/masamok4/anaconda3/.condarc /home/masamok4/.condarc conda version : 4.4.7 conda-build version : 3.0.27 python version : 3.6.3.final.0 base environment : /home/masamok4/anaconda3 (writable) channel URLs : https://conda.anaconda.org/conda-forge/linux-64 https://conda.anaconda.org/conda-forge/noarch https://repo.continuum.io/pkgs/main/linux-64 https://repo.continuum.io/pkgs/main/noarch https://repo.continuum.io/pkgs/free/linux-64 https://repo.continuum.io/pkgs/free/noarch https://repo.continuum.io/pkgs/r/linux-64 https://repo.continuum.io/pkgs/r/noarch https://repo.continuum.io/pkgs/pro/linux-64 https://repo.continuum.io/pkgs/pro/noarch package cache : /home/masamok4/anaconda3/pkgs /home/masamok4/.conda/pkgs envs directories : /home/masamok4/anaconda3/envs /home/masamok4/.conda/envs platform : linux-64 user-agent : conda/4.4.7 requests/2.18.4 CPython/3.6.3 Linux/4.4.0-87-generic ubuntu/16.04 glibc/2.23 UID:GID : 1003:1003 netrc file : None offline mode : False
Packages can be uninstalled from a virtual environment using pip or pipenv.
To remove all packages installed by pip with Python, we run pip uninstall . to run pip freeze to get the list of packages installed. And then we pipe that to xargs pip uninstall -y to remove all the packages listed by pip freeze with pip uninstall . We use the -y to remove everything without needing confirmation.
You can use Jupyter Notebook to solve this problem :
!pip uninstall -y [package]
in a code cellIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With