Introduction to How to Use Conda
Anaconda is a distribution that provides a collection of packages written in Python and R programming languages in the scientific computing field (data science, machine learning application programs, large-scale data processing, predictive analytics, etc.).
The Anaconda distribution has over 12 million users, and it comprises more than 1400 popular data science packages suitable for Windows, Linux, and MacOS.
To install Anaconda, you can download and install the distribution suitable for your OS from the https://www.anaconda.com website.
(Example) Windows, MacOS, Linux
Currently, Anaconda provides versions based on Python 3.7 and Python 2.7, respectively.
Conda is an application provided to manage package versions in Anaconda.
By using conda, the dependency problem that Python users have the most difficulty with when installing packages can be easily addressed.
This document introduces how to use the conda package in the KISTI system for Python users.
The "/home01/userID" directory on the introduction page is the home directory of the test account. Therefore, users are required to change it to the path that is appropriate for them.
A. Use of Conda
For Miniconda, you can download a version suitable for each OS from the https://docs.conda.io/en/latest/miniconda.html site.
For Anaconda, you can download a version suitable for each OS from the https://www.anaconda.com/distribution/#download-section site.
B. Create Conda Environment
The conda environment creates an independent virtual execution environment for Python; hence, it is easy to manage versions of packages.
You can create a conda environment using "conda create -n [ENVIRONMENT].”
The conda environment is created with the environment name specified in the path under envs of the conda path by default.
If the "--use-local" option is adopted, the conda environment is created in the user’s home directory (${HOME}/.conda/envs/[environment_name]).
C. Install and Check Packages in Conda Environment
Packages can be installed using conda install [package name].
Packages in the conda channel can be installed using "conda install -c [channel name] [package name].”
Packages are installed under the conda environment path created in Section 2.
D. Check Conda Environment List
You can check the conda environment list using "conda-env list" or "conda env list.”
E. Remove Conda Environment
You can remove a conda environment using "conda-env remove -n [ENVIRONMENT]" or "conda env remove -n [ENVIRONMENT].”
F. Export Conda Environment
The conda-pack package is required before exporting a conda environment.
(Reference) https://conda.github.io/conda-pack
You can adopt the conda environment in another system by using "conda pack -n [ENVIRONMENT] -o [file name].”
(Example) When the external Internet is not connected, the same conda environment is used in another system
G. Import Conda Environment
You can import the conda environment that was created using conda pack, as presented in the following example, and use it after setting up the environment.
2021년 12월 2일에 마지막으로 업데이트되었습니다.
Last updated