Construction of conda virtual environment

Introduction and installation of related software

1. Install Python

https://www.python.org/downloads/

Python 3.10.3,  March 16, 2022

Two, Python and IDE 

VSCode、PyCharm、Eclipse、IDLE

VSCode - New File、Extension、Interpreter、Language、Run、Powshell

三、Anaconda and IDE

Anaconda:https://www.anaconda.com/

conda environment

conda install numpy, pandas, matplotlib

Steps to build a conda virtual environment

1. Install Anaconda at https://www.anaconda.com/

After the installation is successful, Win+R opens the command line, enter Python, and the version description appears Python installation is successful

2. Use the VScode development environment here, install Python in the development environment, click install to install python as shown in the figure below, and the installation is successful in the figure below.

3. Click ctrl + shift + p on the keyboard, enter >python:select, find Python: Select Interpreter, and click.

 Just select the installed Python

 4. Open the terminal and enter conda activate under PowerShell and press Enter

 No errors typing conda list

The configuration is successful as shown in the figure below!

Note: possible problems

1. Environment variable error

Add environment variables to Path

D:\Anaconda

D:\Anaconda\Scripts

D:\Anaconda\Library\bin

D:\Anaconda\Library\usr\bin

D:\Anaconda\condabin

2. There is a problem with the conda version. Enter conda --version in the terminal. If it is conda 4.10/11, you need to update it. Enter the following command in the terminal.

 conda.bat update -n base conda

3. powershell error

In the current command line interface of vscode, execute the following command:

Start-Process powershell -Verb runAs

The following interface appears

Enter the set-executionpolicy remotesigned command and enter Y

 

Enter get-executionpolicy on the VScode command line to get remotesigned instead of Restricted

 

 

Guess you like

Origin blog.csdn.net/weixin_47131505/article/details/126979541