I installed the package pdfminer3k in an Anaconda environment (called "tractatus").

I can load it. Anaconda knows it's there.

$ python
Python 3.7.2 (default, Dec 29 2018, 00:00:04) 
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pdfminer
>>> 
(tractatus) ~/src/tractatus
$ conda list pdfminer
# packages in environment at /anaconda3/envs/tractatus:
#
# Name                    Version                   Build  Channel
pdfminer3k                1.3.1                    pypi_0    pypi
$ ll /anaconda3/envs/tractatus/lib/python3.7/site-packages/pdfminer3k-1.3.1-py3.7.egg/
total 0
drwxr-xr-x   9 wmcneill  staff  288 Feb  4 14:12 EGG-INFO
drwxr-xr-x  26 wmcneill  staff  832 Feb  4 14:12 pdfminer

Now I want to delete it, but Anaconda's remove command can't find the package.

$ conda remove pdfminer
Collecting package metadata: done
Solving environment: failed

PackagesNotFoundError: The following packages are missing from the target environment:
  - pdfminer


(tractatus) ~/src/tractatus
$ conda remove pdfminer3k
Collecting package metadata: done
Solving environment: failed

PackagesNotFoundError: The following packages are missing from the target environment:
  - pdfminer3k

pdfminer also does not appear in the installed packages list shown for this environment in the Anaconda Navigator UI.

Is this a bug in Anaconda, or am I doing something wrong?

2 Answers

0
Felipe de Macêdo On
  1. Whats is your conda version ?
  2. Do you have multiple environments ?

One possible workaround is try adding the following lines to .condarc file and restarting your system:

channels: - conda-forge - anaconda-fusion - defaults

workaround's source: https://github.com/conda/conda/issues/6633

0
Community On

I guess when you install pdfminer pkg, you are using 'pip install', so by the time you want to remove it, it can not be found at any of your conda env folder.

Instead of

conda remove pdfminer

try:

pip uninstall pdfminer

It works for me.