2

I used pip to install the Resource module to the default conda environment on my laptop: (C:\Users\my_username\Anaconda2). I think it is called root. I installed pip to the conda environment and so I'm 90% sure the resource was installed within the environment. And indeed running conda list shows that the package is listed within the environment. Here is a section of the output:

# packages in environment at C:\Users\conna\Anaconda2:
#
qtpy                      1.2.1                    py27_0
requests                  2.14.2                   py27_0
Resource                  0.2.0                     <pip>
rope                      0.9.4                    py27_1
ruamel_yaml               0.11.14                  py27_1
scandir                   1.5                      py27_0
scikit-image              0.13.0              np112py27_0

However when I run

conda update Resource

I get the following error:

PackageNotInstalledError: Package is not installed in prefix.
prefix: C:\Users\conna\Anaconda2
package name: Resource

How is it possible that conda list shows the module is present but conda update can't see them? I also noticed that conda update doesn't recognize any packages with <pip>. What is happening?

MSeifert
  • 145,886
  • 38
  • 333
  • 352
xjka
  • 55
  • 2
  • 5
  • Conda and pip don't interfere each other. – swatchai Aug 21 '17 at 03:50
  • Conda cannot update packages installed by pip. That is what is happening. You should avoid using pip in conda for this reason, among others, unless absolutely necessary. – darthbith Aug 21 '17 at 17:26
  • related: https://stackoverflow.com/questions/44265533/does-conda-update-packages-from-pypi-installed-using-pip-install – MSeifert Aug 21 '17 at 22:57

2 Answers2

2

conda only manages the packages that are installed using a conda command. If you installed a package with pip (or using python setup.py install or develop) it will show up with conda list (because that shows all packages no matter how they were installed) but conda won't manage that package. Simply because it doesn't know how!

So if you installed a package with pip you also need to upgrade/update it with pip:

pip install [package_name] --upgrade
MSeifert
  • 145,886
  • 38
  • 333
  • 352
0

Try this;

pip install Resource --upgrade
James Draper
  • 5,110
  • 5
  • 40
  • 59