问题
All
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 - vs _) both in conda and pip?
What will happen if I do pip uninstall jupyter-core?
What should be policy toward such packages?
回答1:
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: https://github.com/conda/conda/issues/1237
When you ask conda for a list of packages, this is what happens (or used to happen):
condaknows which packages were installed withconda.condacallspipunder the covers to find packages that were installed outside ofconda.piplists all packages, regardless of where they came from.condafilters the output ofpipby removing the packages installed withconda.
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.
来源:https://stackoverflow.com/questions/35446485/why-there-are-pip-and-conda-packages-after-fresh-installation