Install Python, anaconda and other software and configure the virtual environment

Overview

1. Install python3.6/3.7, Anaconda and jupyter, spyder software.
2. Create a virtual environment called exam1, and install the numpy, pandas, and sklearn packages in the virtual environment.

1. Software installation

1. Python installation

The installation of Python is actually quite simple, you can refer to the following installation tutorial.
Python download and installation graphic tutorial [super detailed] .
Related settings
Insert picture description here
Click next;
Insert picture description here
set according to the figure.
Insert picture description here
Wait for the installation to be
Insert picture description here
installed successfully, click close to
Insert picture description here
view the installation information

cmd命令输入python

Insert picture description here
If this message is displayed, it means that Python is installed successfully.
Installation package
The following is the Python installation package. If you need it, you can download it from Baidu network disk.

https://pan.baidu.com/s/1-fDFV6DQNSP37-OB7fsjGA .
Extraction code:r84j

2. Anaconda installation

For the installation information of anaconda, you can refer to this article of mine, which has this detailed explanation.

Anaconda installation tutorial & rough solution .

Similarly, if you have a demand for anaconda, you can go to Baidu Netdisk to download it yourself

https://pan.baidu.com/s/1u8mRRjSnQvsGnAymBpeNgA .
Extraction code:yvd9

3. Jupyter, spyder installation

In the home interface of the installed anaconda, there are jupyter and spyder installations, you can click launch;
Insert picture description here
jupyter's launch;
Insert picture description here
related application
Insert picture description here
code editing interface (Python language)
Insert picture description here
spyder's launch;
Insert picture description here
prompt processing, you can ignore it,
you can also follow the following method to install , Here is a link for everyone.

1. How to install the python editor spyder .
2. spyder 4.2.3 .
3. Jupyter .

Two, anaconda environment variable configuration

The environment variable configuration method is the same:

右键此电脑 -> 属性 -> 高级系统设置 -> 环境变量 -> path;

Insert picture description here
Check whether the environment variables are successfully configured.
win+RShortcut key to open the run window; then enter cmd and press Enter; finally execute in the opened command prompt conda;
Insert picture description here
if the above information appears, the anaconda environment configuration is successful.

Three, create a virtual environment

Follow the instructions to create a virtual environment

conda create -n (虚拟环境名称)exam1 python=3.8(Python版本号)

Insert picture description here

Waiting to download
Insert picture description here
Activate virtual environment

activate

Enter the virtual environment

conda activate exam1

Insert picture description here
Install numpy, pandas, sklearn

pip install numpy -i "https://pypi.doubanio.com/simple/"
pip install pandas -i "https://pypi.doubanio.com/simple/"
pip install sklearn -i "https://pypi.doubanio.com/simple/"

Insert picture description here
Insert picture description here
Insert picture description here
Extra commands

Activate the virtual environment:
activate your_env_name(虚拟环境名称)
exit the virtual environment:
deactivate env_name,
switch back to the root environment:
activate root
delete the virtual environment:
conda remove -n your_env_name(虚拟环境名称) --all
delete the package in the virtual environment:
conda remove --name $your_env_name $package_name(包名)

Four, summary and reference materials

1. Summary

This article is mainly about software installation, most of which can be found on Baidu. Learn together and make progress together!

2. Reference materials

Python learning network .
Anaconda creates a virtual environment and replaces the pip installation source .
The conda tool under Anaconda is selected as the tool for building the python virtual environment .

Guess you like

Origin blog.csdn.net/QWERTYzxw/article/details/114947922