1. under the windows environment
Temporary modification
Tsinghua University using numpy source installation package.
pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple
Permanent modification
1.1 USERPROFILE environment variable to find the address of:
Enter cmd set in, find USERPROFILE address (generally is in the user directory)
1.2 into the USERPROFILE directory
Enter% APPDATA% in the windows file manager, Enter.
1.3 pip a new directory and pip.ini files in the directory, pip.ini enter the following:
[global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple trusted-host = pypi.tuna.tsinghua.edu.cn disable-pip-version-check = true timeout = 120
- index-url: source address, can be replaced by other sources
- trusted-host: add the source as a trusted host, or else possible error
- disable-pip-version-check: set to true to cancel pip version check and remove the latest report every pip
- timeout: timeout settings
2. Under the linux environment
2.1 pip find the default directory, modify pip.conf .pip files in the directory in the directory (not on their construction)
2.2 modify the contents of the file
[global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple trusted-host = pypi.tuna.tsinghua.edu.cn disable-pip-version-check = true
Mirroring the domestic sources are as follows:
Tsinghua University: https://pypi.tuna.tsinghua.edu.cn/simple
Ali: https://mirrors.aliyun.com/pypi/simple
watercress: HTTP: //pypi.douban. com / simple /
University of Science and technology of China: https://pypi.mirrors.ustc.edu.cn/simple
Huazhong University of Science: http://pypi.hustunique.com/simple
Shandong University of technology: HTTP: //pypi.sdutlinux .org / simple
Tsinghua University: https://pypi.tuna.tsinghua.edu.cn/simple
Ali: https://mirrors.aliyun.com/pypi/simple
watercress: HTTP: //pypi.douban. com / simple /
University of Science and technology of China: https://pypi.mirrors.ustc.edu.cn/simple
Huazhong University of Science: http://pypi.hustunique.com/simple
Shandong University of technology: HTTP: //pypi.sdutlinux .org / simple