posted on 2023-05-21 17:19 read(558) comment(0) like(20) collect(3)
When learning machine learning, Anaconda is generally used.
Anaconda is a powerful open source data science platform, which integrates many good tools, greatly simplifies the user's workflow, and can help users solve a series of data science problems.
Some friends are struggling to install python or install anaconda first. The suggestion here is to install anaconda, so there is no need to install python separately, because anaconda comes with python, and after installing anaconda, the default python version is the python version that comes with anaconda.
The installation of Anaconda is divided into two situations:
Situation 1 : The computer is not installed with python or it can be uninstalled now ( uninstall python first when installing Anaconda )
Situation 2: The computer is currently installed with python, but I want to keep it (It is more complicated, please refer to other tutorials on the Internet!)
First, use the uninstall tool that comes with the computer housekeeper to uninstall python , and manually delete the files in the installation directory (this part is very simple and will not be introduced in detail), and then delete the environment variables:
Step 1 : Computer (right click) → Properties → Advanced System Settings → (click) Environment Variables
Step 2 : View the environment variables set by the user, which is the column above, find the path, double-click the value behind the path, and enter to view the environment variables you have set.
Step 3 : Delete all the variables for installing python, select both values in the figure, then click delete, and then confirm ( if the environment variables are automatically deleted after uninstalling python, don’t worry about it! )
Note : When exiting, don't forget that there are several confirmation buttons outside, which also need to be clicked, do not cross them directly, otherwise the settings will not be saved.
ok, at this point, python is completely uninstalled!
Method 1: Log in to the Anaconda official website .
Method 2: The official website download is too slow, the recommended download address: ** Click here to download from Tsinghua Mirror Station
计算机(右键)→属性→高级系统设置→(点击)环境变量
在下面系统变量里,找到并点击Path
在编辑环境变量里,点击新建
输入下面的五个环境变量。(这里不是完全一样的!你需要将以下五条环境变量中涉及的到的"D:\WorkSoftware\Install\Anaconda3"都修改为你的Anaconda的安装路径)
D:\WorkSoftware\Install\Anaconda3
D:\WorkSoftware\Install\Anaconda3\Scripts
D:\WorkSoftware\Install\Anaconda3\Library\bin
D:\WorkSoftware\Install\Anaconda3\Library\mingw-w64\bin
D:\WorkSoftware\Install\Anaconda3\Library\usr\bin
简要说明五条路径的用途:这五个环境变量中,1是Python需要,2是conda自带脚本,3是jupyter notebook动态库, 4是使用C with python的时候
新建完成后点击确定!
同时按 win + r ,输入cmd,在弹出的命令行查看anaconda版本,输入 :
conda --version
输入:
python
若出现版本号,即代表配置成功!
在电脑屏幕左下角的Windows徽标键这里,选择点击绿色圈圈Anaconda Navifator将其打开
出现此界面即为安装成功:
到这里,基本的安装和设置就好啦!
使用
conda install 包名
It is very convenient to install the required Python package, but the official server is abroad, and the download speed is slow. Tsinghua University in China provides a mirror warehouse of Anaconda. We change the source toMirror source of Tsinghua University
Operate in the Anaconda prompt:
Enter the following command on the command line to
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
//设置搜索时显示通道地址
conda config --set show_channel_urls yes
Check if the channel is modified:
conda config --show channels
restore default sources
conda config --remove-key channels
Delete the old mirror source
conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/cpu/
Add a new mirror source
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/cpu/
Completely uninstall the Anaconda tutorial, reproduced!
If you want to do deep learning, you may need to install tensorflow, pytorch, etc. If you need to install tensorflow-gpu, you can refer to my other blog:
Tensorflow-gpu nanny level installation tutorial
Author:Fiee
link:http://www.pythonblackhole.com/blog/article/25262/9ea8dea6f769c3a4c3d3/
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!