How do I keep track of pip-installed packages in an Anaconda (Conda) environment?

后端 未结 10 2485
萌比男神i
萌比男神i 2020-11-28 00:35

I\'ve installed and have been using the Anaconda Python distribution, and I have started using the Anaconda (Conda) environment. I can use the standard conda install..

10条回答
  •  春和景丽
    2020-11-28 01:02

    My which pip shows the following path:

    $ which pip
    /home/kmario23/anaconda3/bin/pip
    

    So, whatever package I install using pip install will have to be reflected in the list of packages when the list is exported using:

    $ conda list --export > conda_list.txt
    

    But, I don't. So, instead I used the following command as suggested by several others:

    # get environment name by
    $ conda-env list
    
    # get list of all installed packages by (conda, pip, etc.,)
    $ conda-env export -n  > all_packages.yml
    # if you haven't created any specific env, then just use 'root'
    

    Now, I can see all the packages in my all-packages.yml file.

提交回复
热议问题