Task | Conda package and environment manager command | Pip package manager command |
Install a package | conda install $PACKAGE_NAME | pip install $PACKAGE_NAME |
Update a package | conda update --name $ENVIRONMENT_NAME $PACKAGE_NAME | pip install --upgrade $PACKAGE_NAME |
Update package manager | conda update conda | Linux/macOS: pip install -U pip Win: python -m pip install -U pip |
Uninstall a package | conda remove --name $ENVIRONMENT_NAME $PACKAGE_NAME | pip uninstall $PACKAGE_NAME |
Create an environment | conda create --name $ENVIRONMENT_NAME python | X |
Activate an environment | source activate $ENVIRONMENT_NAME | X |
Deactivate an environment | source deactivate | X |
Search available packages | conda search $SEARCH_TERM | pip search $SEARCH_TERM |
Install package from specific source | conda install --channel $URL $PACKAGE_NAME | pip install --index-url $URL $PACKAGE_NAME |
List installed packages | conda list --name $ENVIRONMENT_NAME | pip list |
Create requirements file | conda list --export | pip freeze |
List all environments | conda info --envs | X |
Install other package manager | conda install pip | pip install conda |
Install Python | conda install python=x.x | X |
Update Python | conda update python* | X |
conda VS PIP
最新推荐文章于 2024-08-22 09:55:59 发布