1. Installing Anaconda
: Tsinghua Mirror Station
For your operating system, select the appropriate version in the application software->conda, download link . The installation method is relatively simple and is not described in detail.
The Windows System installation process needs to be noted, tick the Add software to the Windows path (can also be added manually, that is, in the environment variable path will be added to the Conda.exe file path), so that the cmd command can run the Conda command.
2.conda list (view the packages already installed in the current environment)
After installation, by <conda list>
looking at the packages already installed in Conda, the name __ and __ versions of __ are displayed.
3.conda Creating an isolated python environment
There are two ways of doing this:
conda create -name env package-name(创建环境)在程序开始菜单中打开anaconda Navigator,通过GUI界面创建新的环境
4.conda env List
View a list of currently established environments (or you can view the list of environments directly in the GUI interface of Navigator)
5.activate env_name (activating environment)
Using this command, you can activate the Create environment
6. View the built-in dependent libraries in an active environment and add (install) the required libraries
-
<conda list>
(view installed libraries)
- Conda Install packagename (Install a library)
-
For example, install Pyreadl INE (a jupyter-based Python code auto-complete library, recommended)
<conda install pyreadline>
7. Export an environment for sharing
- for users using Anaconda to export the configuration in the current environment (the installation of the library) to the YAML format (it is recommended to provide this file when you share a Python project. Allows the companion to use the next command can be configured in the current environment)
<conda env export > env_name.yaml>
-
Configure the current environment with an external import
<conda env update-f=path/env_name.yaml>
for users who do not use anaconda <pip Freeze > Env_name.txt>
<+pip install-r path/env_name.txt>
8.conda env Remove- Name Env_name (delete environment) 9. Highly Recommended package
- Jupyter Notebook Click to view Jupyter notebook introduction
<conda Install Jupyter Notebook>
- Auto-correlate Environment dependency package (based on jupyter notebook )
<conda install nb_conda>
-
Code Auto-complete package (based on jupyter notebook )
< Conda install pyreadline>
Reference: More
Anaconda managing multiple Python versions