Install python environment in VS and summary of problems encountered and solutions

Foreword: Because I have been using pycharm before,
but I don’t know why the request package suddenly can’t be used. After looking for the reason, I found that there was a problem with the environment configuration, which seemed to conflict with my own software,
so I abandoned pycharm and integrated it into vs

text:

① Install python environment

Directly search for visual studio install to install
Insert picture description here
and then click to modify
Insert picture description here

After entering, check the python environment

②vs python 2.5 and earlier versions do not allow debugging

Solution
Insert picture description here
Click Add/Remove Python Environment and select Python 3.6. The problem can be solved

Insert picture description here

Works perfectly
Insert picture description here

Title ③Install the third-party package solution

One, click to view all environments

2. Open in powershell
Insert picture description here
3. Domestic mirror website

Domestic mirror
http://pypi.douban.com/simple/ Douban
http://mirrors.aliyun.com/pypi/simple/ Ali
http://pypi.hustunique.com/simple/ Huazhong University of Science and Technology
http://pypi .sdutlinux.org/simple/ Shandong University of Technology
http://pypi.mirrors.ustc.edu.cn/simple/ University of Science and Technology of China
https://pypi.tuna.tsinghua.edu.cn/simple Tsinghua

Four, use pip command to install

pip install --index https://pypi.mirrors.ustc.edu.cn/simple/ pandas

Then enter ends

④The problem of pip installation library

The common problem
is that you need to specify the source to download. After
Insert picture description here
a long time, I finally figured it out.

For example, the method of downloading requests
is
pip install -i domestic mirror address package name

For example: pip install -i https://mirrors.aliyun.com/pypi/simple/ numpy

which is

pip install -i  https://mirrors.aliyun.com/pypi/simple/ requests

Then pip list
Insert picture description here
perfectly solves the problem
pip typical sentence link

Guess you like

Origin blog.csdn.net/qq_33942040/article/details/107793553