Linux command
conda 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Create
conda create -n [myenv] [python=3.11]
Activate
conda activate [myenv]
Install
conda install [numpy]
List
conda env list
Export
conda env export > [environment.yml]
Deactivate
conda deactivate
说明
conda is a cross-platform package and environment management system originally developed for Python but extended to support R, Ruby, Lua, Scala, Java, JavaScript, C/C++, and other languages. Unlike pip which only manages Python packages, conda handles complete environments including system-level dependencies and compiled libraries, making it particularly valuable for scientific computing where native dependencies are common. The environment isolation feature allows multiple projects with conflicting dependency requirements to coexist on the same system. Each conda environment is a directory containing a specific collection of packages, and switching between environments changes which packages are available. This is essential for data science workflows where different projects may require different versions of NumPy, TensorFlow, or other foundational libraries. Conda distributes binary packages rather than building from source, which dramatically speeds up installation and eliminates compilation errors that plague pip-based workflows. The package ecosystem is organized into channels, with conda-forge being the largest community-maintained channel. conda is included in both Anaconda (a large distribution with 1500+ packages) and Miniconda (minimal installer with just conda and Python). The tool has become the de facto standard in data science, machine learning, and scientific computing communities.
参数
- create -n _name_
- Create new environment
- install _package_
- Install package
- update _package_
- Update package
- remove _package_
- Remove package
- list
- List installed packages
- search _package_
- Search for package
- env list
- List environments
- activate _name_
- Activate environment
- deactivate
- Deactivate environment
FAQ
What is the conda command used for?
conda is a cross-platform package and environment management system originally developed for Python but extended to support R, Ruby, Lua, Scala, Java, JavaScript, C/C++, and other languages. Unlike pip which only manages Python packages, conda handles complete environments including system-level dependencies and compiled libraries, making it particularly valuable for scientific computing where native dependencies are common. The environment isolation feature allows multiple projects with conflicting dependency requirements to coexist on the same system. Each conda environment is a directory containing a specific collection of packages, and switching between environments changes which packages are available. This is essential for data science workflows where different projects may require different versions of NumPy, TensorFlow, or other foundational libraries. Conda distributes binary packages rather than building from source, which dramatically speeds up installation and eliminates compilation errors that plague pip-based workflows. The package ecosystem is organized into channels, with conda-forge being the largest community-maintained channel. conda is included in both Anaconda (a large distribution with 1500+ packages) and Miniconda (minimal installer with just conda and Python). The tool has become the de facto standard in data science, machine learning, and scientific computing communities.
How do I run a basic conda example?
Run `conda create -n [myenv] [python=3.11]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does create -n _name_ do in conda?
Create new environment