What is the effect of using pip to install python packages on anaconda?

前端 未结 1 771
日久生厌
日久生厌 2020-11-27 07:23

I have installed a fresh anaconda v4.4. I realized that python packages can be installed using both conda and pip. What is the effect of using pip to install python packages

相关标签:
1条回答
  • 2020-11-27 07:54

    Everything might keep working if you use pip to install vs conda. However, Conda cannot manage dependencies that pip has installed - it cannot upgrade them, or remove them. More importantly, conda will install a package even if its already been installed with pip! Try this test:

    conda create -n testenv python=3
    conda activate testenv
    pip install numpy
    conda install scipy
    

    You will see from the third command that conda will want to re-install NumPy, even though it has already been installed with pip. This can cause problems if there are C libraries whose linking is different, or something like that. In general, whenever possible, use conda to install packages into conda environments.

    0 讨论(0)
提交回复
热议问题