Anaconda establish virtual environment and FAQs

 

anaconda is excellent python release, integrates a variety of commonly used data analysis library, the following summarize anaconda frequently used functions.

View anaconda virtual environment

conda env list
# 或者
conda info -e

Create a new virtual environment

conda create -n env_name python=version

Activating virtual environment

conda activate env_name

Delete the virtual environment

conda env remove -n env_name
conda remove –name env_name –all

Share virtual environment

conda env create -f env.yaml

Package Management

  1. Download package
    conda install package_name

  2. Download the package at the same time, you can also specify the download version
    conda install pack = version

  3. Delete package
    conda remove package_name

  4. Update package
    conda update package_name

  5. Lists all installed packages
    conda list

  6. Find package version information
    conda search package_name

  7. Pack removal never use
    conda clean --packages

  8. Delete tar package
    $ conda clean --tarballs

  9. Delete index cache, lock files, unused and package tar package.
    $ Conda clean -a

common problem

  1. windows powershell script can not be loaded
    Problem Description: After using conda init, powershell display
powershell:无法加载文件ps1,因为在此系统中禁止执行脚本

Solution:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

Guess you like

Origin www.cnblogs.com/lvdongjie/p/12174587.html