The environment is: under Win7, the company's intranet needs to pass HTTP proxy and authentication, and requires SSL certificate to access external HTTPS websites
The goal is: Download the third-party library Pillow for the installed python3.6
After reading a lot of article clips with different backgrounds on the Internet, I tried a lot of combinations and finally succeeded. Let’s record the format and path first:
1. Enter the python script directory:
c:> cd /d D:\Programs\Python36\Scripts
2, install pip, execute the command
easy_install.exe pip
3. Execute the pip command to install the third-party library Pillow. The final format is:
pip install --proxy http://usernamexxx:passwordxxx@proxyip:proxyport --cert C:\xxxx.cer Pillow
Attached, successfully downloaded the installation log:
Collecting Pillow Downloading Pillow-4.3.0-cp36-cp36m-win32.whl (1.4MB) 100% |████████████████████████████████| 1.4MB 40kB/s Collecting olefile (from Pillow) Downloading olefile-0.44.zip (74kB) 100% |████████████████████████████████| 81kB 32kB/s Installing collected packages: olefile, Pillow Running setup.py install for olefile ... done Successfully installed Pillow-4.3.0 olefile-0.44
Attached, the proxy is well-formed, the logs for the missing SSL certificate:
Collecting Pillow Could not fetch URL https://pypi.python.org/simple/pillow/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) - skipping Could not find a version that satisfies the requirement Pillow (from versions: ) No matching distribution found for Pillow