之前用了centos6 有了內建的python2.7 當然也有內建的pip
可是最近想學了 python 網上及找的資料都是python3 所以在不衝突的狀況下用tarball安裝
來了個python3.4,
但最近想做維運管理,怎麼裝都不行把 fabric搞起來,因為不支援python3
原來,我安裝tarball時,我的pip是for python3!啊嘶....
我目前是這麼解決的,python2 是 #>python 那麼python3.4 是 #>python3.4
所以我目前pip版本是 for python3.4的...怎麼看?
看了/usr/bin/pip,內容就是python3.4的路徑!!!
認真的GOOGLE之後,
#>python -m pip install fabric
其在在這個動作之前,我們可以先把get-pip.py下載
wget https:
//bootstrap
.pypa.io
/get-pip
.py
然後呢?
#>python get-pip.py
#>python3.4 get-pip.py
版本當然我們在安裝就可以pip or pip3.4之類的
最後成功的將難搞的fabric裝好了
#>python -m pip install fabric
以上
參考如下
http://stackoverflow.com/questions/22278138/where-is-pip-installed-to-when-using-get-pip-py
http://rewriterdark.blogspot.tw/2015/01/linux-centos-install-python27-and.html
https://pip.pypa.io/en/latest/installing.html#pip-included-with-python