我得到了嘗試通過PIP安裝Pexpect的時候下面的錯誤「Asse田只有Python 2.7版,後來被ptyprocess支持」::通過PIP Python的安裝Pexpect的時候2.6
# pip install pexpect
Collecting pexpect
do_ypcall: clnt_call: RPC: Unable to receive; errno = Connection refused
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Using cached pexpect-4.0.tar.gz
Collecting ptyprocess>=0.5 (from pexpect)
Using cached ptyprocess-0.5.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-2X4It7/ptyprocess/setup.py", line 10, in <module>
"Only python 2.7 and later is supported by ptyprocess.")
AssertionError: Only python 2.7 and later is supported by ptyprocess.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-2X4It7/ptyprocess
,很明顯的是下載ptyprocess
作品只使用python 2.7,但不是pip
應下載正確的軟件包版本,與已安裝的python
版本兼容?
我的系統信息:
pip -V: pip 7.1.2 from /usr/lib/python2.6/site-packages (python 2.6)
python -V: Python 2.6.6
OS: CentOS 6.3
BTW:yum install pexpect
成功地安裝Pexpect的包
謝謝
嗯,你是一定的'requirements.txt'(如果有的話),不包含不正確的庫的版本?您可能已經簡單地發現了該軟件包設置中的一個錯誤。 – BlackVegetable