How to configure Tsinghua mirror source in Python

醉折花枝作酒筹
Release: 2021-04-27 09:33:18
forward
28974 people have browsed it

This article introduces how to configure Tsinghua mirror source in Python. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

How to configure Tsinghua mirror source in Python

Python configuration Tsinghua mirror source

1. Preface

Use pip to install the python library of the server abroad When downloading, it takes a long time to download. Setting domestic mirrors in the configuration file can increase the speed. Tsinghua mirror source is one of them.
2.pypi Mirror usage help

URL: https://mirrors.tuna.tsinghua.edu.cn/help/pypi/

3. Temporary configuration

If you only temporarily download a python library, you can use the following command to configure it:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
Copy after login

Description: "some-package" is the python library to be downloaded name (or package name).

4. Default configuration (permanent configuration)

pip install pip -U
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
Copy after login

Instructions:
(1) "pip install pip -U" is the command used to upgrade pip ;

(2) If pip is version 10.0.0 or above, you can upgrade;

(3) Command to view the pip version: pip -V

Related free Learning recommendation: python video tutorial!

The above is the detailed content of How to configure Tsinghua mirror source in Python. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!