機(jī)械性的安裝Python3之后妻往,隨后用python3 get-pip.py
開始安裝pip,出現(xiàn)了如下的報(bào)錯(cuò)
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
ERROR: Could not find a version that satisfies the requirement pip (from versions: none)
ERROR: No matching distribution found for pip
通過檢索吐句,發(fā)現(xiàn)是編譯過程中漏掉了SSL的支持,于是店读,我檢查了下我的編譯日志信息
running build
running build_ext
INFO: Can't locate Tcl/Tk libs and/or headers
Python build finished successfully!
The necessary bits to build these optional modules were not found:
_sqlite3 _ssl _tkinter
readline
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
atexit pwd time
果不其然嗦枢,從日志中發(fā)現(xiàn)了問題所在,發(fā)現(xiàn)_ssl
庫(kù)沒有安裝屯断,解決方法就是安裝openssl-devel
文虏。
# 順手解決 Can't locate Tcl/Tk libs and/or headers
sudo yum install tcl-devel tk-devel
# 解決_ssl問題
sudo yum install openssl-devel
重新編譯之后,就沒有對(duì)應(yīng)的問題了殖演。