posted on 2023-06-03 20:37 read(303) comment(0) like(30) collect(4)
Anaconda refers to an open source Python distribution that includes more than 180 scientific packages such as conda and Python and their dependencies.
Because it contains a large number of scientific packages, the download file of Anaconda is relatively large (about 477MB). If you only need some packages, or you need to save bandwidth or storage space, you can also use Miniconda, a smaller distribution (conda and Python only ).
Conda is an open source package and environment manager, which can be used to install different versions of software packages and their dependencies on the same machine, and can switch between different environments. Anaconda already includes Conda, and Anaconda includes Conda, Python, also includes a lot of installed toolkits, such as: numpy, pandas, etc.
Download the official website: https://www.anaconda.com/products/distribution
If it is a Windows system, directly click the icon to download the latest version:
If not, clicking the other appropriate icon will take you to the version options for the following three operating systems:
Because Anaconda is cross-platform, there are Windows, macOS , and Linux versions. Here we take the Windows version as an example, and click the Windows icon (the first arrow in Figure 1).
Then downloaded is
Python 3.8 version
64-bit graphical installer (477 MB)
Of course, you can also choose the 32-Bit version according to your actual situation (most computers are 64-bit now).
Double-click the downloaded Anaconda3-2021.05 -Windows-x86_64.exe file
The following interface appears, click Next to proceed to the next step
Click I Agree (I agree)
Install for: Just me or All Users. If your computer has several Users, you need to consider this issue. In fact, our computer generally only has one User, and we use it alone. If your computer has multiple users, select All Users. I am here directly Just me, I am only one user, continue to click Next
Destination Folder means "target folder", choose where to install.
The default is to install to the C:\ProgramData\Anaconda3 folder. You can also choose Browse… to select the folder you want to install.
I don't have enough space on my C drive, so I chose to install it on my E drive.
Note: The folder must be empty, and the address in the red box does not contain Chinese, otherwise an error will be reported
Click Next
Let me mention here that Anaconda is very powerful and takes up a lot of space, 2.6GB, which is almost the size of a high-definition movie. However, for the sake of learning, what is this hard disk space.
Here comes Advanced Options (advanced options). Two defaults are fine. The first one is to add environment variables, which are not checked by default. The second one is to use Python 3.8 by default, which is checked by default. Click "Install" to finally start the installation.
The process is quite long, please be patient.
After a long wait, the installation is finally completed Installation Complete (installation complete), click Next>.
Click Next
Click Finish, the two √ can be canceled.
If it is windows, you need to go to:
Control Panel\System and Security\System\Advanced System Settings\Environment Variables\User Variables\PATH (or directly search the advanced system settings in the search box) to add the Scripts folder of the anaconda installation directory, see personal The installation path is different and needs to be adjusted by yourself.
There are many scripts we can use:
Enter in the search box to view advanced system settings, click to view advanced system settings.
Click on Environment Variables
Double-click the path in the user variable (the system is also OK)
Click New; add the Scripts folder of the anaconda installation directory, and adjust it yourself depending on the personal installation path; finally click OK.
Exit the environment variable, and the system property page should also be confirmed.
Then you can open the command line (preferably opened in administrator mode)
enter
conda --version
If the conda version is output, it means that the environment variable is set successfully.
For some subsequent uses connected with pycharm, specific principles of anaconda and other uses, see the link at the bottom of the reference [1] for details. This article only details the installation of recent versions of Ancona. In addition, use the conda command to install third-party packages and some commonly used commands. Beginners can ignore it for now, and you can read it when you use it.
enter
conda install requests
or
pip install requests
to install the requests package (or some other packages)
After the installation is complete, we enter python to enter the interpreter and import the requests package. This time it must be successful.
Also take the requests package as an example, enter
conda remove requests
or
pip uninstall requests
To view all installed packages in the current environment you can use
conda list
If you want to export the package information of the current environment, you can use
conda env export > environment.yaml
Store the package information in the yaml file.
When you need to recreate the same virtual environment, you can use
conda env create -f environment.yaml
Commonly used commands are listed below:
activate # 切换到base环境 activate learn # 切换到learn环境 conda create -n learn python=3 # 创建一个名为learn的环境并指定python版本为3(的最新版本) conda env list # 列出conda管理的所有环境 conda list # 列出当前环境的所有包 conda install requests 安装requests包 conda remove requests 卸载requets包 conda remove -n learn --all # 删除learn环境及下属所有包 conda update requests 更新requests包 conda env export > environment.yaml # 导出当前环境的包信息 conda env create -f environment.yaml # 用配置文件创建新的虚拟环境
Author:kimi
link:http://www.pythonblackhole.com/blog/article/78458/b4bbd99f3f6cc5882919/
source:python black hole net
Please indicate the source for any form of reprinting. If any infringement is discovered, it will be held legally responsible.
name:
Comment content: (supports up to 255 characters)
Copyright © 2018-2021 python black hole network All Rights Reserved All rights reserved, and all rights reserved.京ICP备18063182号-7
For complaints and reports, and advertising cooperation, please contact vgs_info@163.com or QQ3083709327
Disclaimer: All articles on the website are uploaded by users and are only for readers' learning and communication use, and commercial use is prohibited. If the article involves pornography, reactionary, infringement and other illegal information, please report it to us and we will delete it immediately after verification!