转:Python出现Could not find a version that satisfies the requirement openpyxl (from versions: )

https://blog.csdn.net/weixin_42840933/article/details/85308265

A environment
when using python3.7, there are mistakes with pip install openpyxl:


System Environment: windows10 Home Edition
version of Python: python3.7.1
IDE: sublime_text 3
two solutions.
Follow the prompts is one of the reasons is the pip version is too low, the need to update pip:
python -m pip pip install --upgrade
due python domestic network instability, error has been upgraded many times before they succeed.
Then continue or error:

It may consider to be the network of domestic python problem, then we use domestic sources to accelerate the mirror.
pip install the package name -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
This is the watercress source
--trusted-host pypi.douban.com This is to obtain the certification ssl certificate , or else an error will
however still being given, may be the reason my computer networks, common sense can be installed successfully, you should have this step may solve the problem.
I finally used pip3 install openpyxl many attempts before a successful installation.

Three pip difference and pip3 of
fact, these two commands effect is the same, there is no difference:

For example install repository openpyxl, pip3 install openpyxl or pip install openpyxl: a computer only when there are multiple versions of the Python, by PIP3 can automatically install the library distinguished by Python3. And Python2 is to avoid conflict.
(2) If your computer only the Python3 installed, regardless of use pip or pip3 all the same.
After installing python3, there PIP3
(1) use pip install XXX:
The new library will be installed in the following directory: python2.7 / Site-Packages Standard Package
(2) use pip3 install XXX:
The new installation will be placed in the library directory: python3.7 / Site-Packages Standard Package
(3) If you use python3 program execution, you can not importpython2.7 / site-packages in the library.
---------------------
Disclaimer: This article is CSDN blogger "My wood rock" of the original article, follow the CC 4.0 by-sa copyright agreements, please attach a reprint the original source link and this statement.
Original link: https: //blog.csdn.net/weixin_42840933/article/details/85308265

Guess you like

Origin www.cnblogs.com/ahc28/p/11351009.html