Severin Pappadeux Severin Pappadeux - 1 year ago 82
Python Question

Why there are pip and conda packages after fresh installation?


Windows 10, 64bit, d/l Anaconda 2.5.0 with Python3, 64bit and installed it

After fresh installation i type

conda list
, and, among packages, I see
duplicates like

jupyter 1.0.0 py35_1
jupyter-client 4.1.1 <pip>
jupyter-console 4.1.0 <pip>
jupyter-core 4.0.6 <pip>
jupyter_client 4.1.1 py35_0
jupyter_console 4.1.0 py35_0
jupyter_core 4.0.6 py35_0

Is it normal, and why some packages (not all of them, just a few) have
duplicates (not quite, there is
) both in conda and pip?

What will happen if I do
pip uninstall jupyter-core

What should be policy toward such packages?

Answer Source

It's a known problem with the output of conda. The packages are installed only once, but due to differing naming conventions, they are listed twice. There is a (now closed) bug report about it:

When you ask conda for a list of packages, this is what happens (or used to happen):

  • conda knows which packages were installed with conda.
  • conda calls pip under the covers to find packages that were installed outside of conda.
  • pip lists all packages, regardless of where they came from.
  • conda filters the output of pip by removing the packages installed with conda.

Afaict, the problem is with conda-installed packages that contain an underscore. pip replaces underscores with hyphens in its output. Therefore, conda fails to detect that it's a package installed by itself, and lists it as installed by pip. Of course, conda also lists the package with its original, underscored name as installed by conda. Hence the duplicates.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download