win10下安裝Django出現(xiàn)Python中的ssl模塊不可用
報(bào)如下錯(cuò)誤:
pip?is?configured?with?locations?that?require?TLS/SSL,?however?the?ssl?module?in?Python?is?not?available.
Collecting?django==2.2.2??
Retrying?(Retry(total=4,?connect=None,?read=None,?redirect=None,?status=None))?after?connection?broken?by?'SSLError("Can't?connect?to?HTTPS?URL?because?the?SSL?module?is?not?available.")':?/simple/django/??
Retrying?(Retry(total=3,?connect=None,?read=None,?redirect=None,?status=None))?after?connection?broken?by?'SSLError("Can't?connect?to?HTTPS?URL?because?the?SSL?module?is?not?available.")':?/simple/django/??
Retrying?(Retry(total=2,?connect=None,?read=None,?redirect=None,?status=None))?after?connection?broken?by?'SSLError("Can't?connect?to?HTTPS?URL?because?the?SSL?module?is?not?available.")':?/simple/django/??
Retrying?(Retry(total=1,?connect=None,?read=None,?redirect=None,?status=None))?after?connection?broken?by?'SSLError("Can't?connect?to?HTTPS?URL?because?the?SSL?module?is?not?available.")':?/simple/django/??
Retrying?(Retry(total=0,?connect=None,?read=None,?redirect=None,?status=None))?after?connection?broken?by?'SSLError("Can't?connect?to?HTTPS?URL?because?the?SSL?module?is?not?available.")':?/simple/django/??
Could?not?fetch?URL?https://pypi.org/simple/django/:?There?was?a?problem?confirming?the?ssl?certificate:?HTTPSConnectionPool(host='pypi.org',?port=443):?Max?retries?exceeded?with?url:?/simple/django/?(Caused?by?SSLError("Can't?connect?to?HTTPS?URL?because?the?SSL?module?is?not?available."))?-?skipping??
Could?not?find?a?version?that?satisfies?the?requirement?django==2.2.2?(from?versions:?)No?matching?distribution?found?for?django==2.2.2
pip?is?configured?with?locations?that?require?TLS/SSL,?however?the?ssl?module?in?Python?is?not?available.
Could?not?fetch?URL?https://pypi.org/simple/pip/:?There?was?a?problem?confirming?the?ssl?certificate:?HTTPSConnectionPool(host='pypi.org',?port=443):?Max?retries?exceeded?with?url:?/simple/pip/?(Caused?by?SSLError("Can't?connect?to?HTTPS?URL?because?the?SSL?module?is?not?available."))?-?skipping
求解,安裝Django安裝失敗
2019-06-29
pip3 install django==2.2.1 用這個(gè)試試看
2019-06-11
將"[Anaconda安裝目錄](méi)\Library\bin"加入PATH