国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > Python > 正文

Linux中Python 環境軟件包安裝步驟

2019-11-25 16:51:34
字體:
來源:轉載
供稿:網友

簡介:

記錄一下關于 Python 環境軟件包的一些安裝步驟

1、升級 Python 到 2.7.10( 默認 2.6.6 )

shell > yum -y install epel-releaseshell > yum -y install gcc wget readline-devel zlib-devel openssl-develshell > wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgzshell > tar zxf Python-2.7.10.tgzshell > cd Python-2.7.10 ; ./configure --prefix=/usr/local/python2.7 ; make ; make installshell > mv /usr/bin/python /usr/bin/old_pythonshell > ln -s /usr/local/python2.7/bin/python /usr/bin/pythonshell > sed -i '1s/python/old_python/' /usr/bin/yumshell > python -VPython 2.7.10

## 這樣就實現的 python 的升級
## readline-devel 這個包要事先安裝,不然后面的 ipython 不支持 tab 、方向鍵等,還要重新編譯 python
## zlib-devel 這個包 Setuptools 會用到,openssl-devel 這個包 pip 會用到
## /usr/bin/yum 文件解釋器要改一下,不然無法使用 yum

2、安裝 Setuptools

shell > wget https://pypi.python.org/packages/source/s/setuptools/setuptools-15.2.tar.gz#md5=a9028a9794fc7ae02320d32e2d7e12eeshell > tar zxf setuptools-15.2.tar.gzshell > cd setuptools-15.2 ; python setup.py installshell > ln -s /usr/local/python2.7/bin/easy_install /usr/bin/easy_install

## 這樣 Setuptools 也安裝好了,如果不安裝這個包直接下載 pip 源碼包安裝可能會報錯說找不到 Setuptools

3、安裝 pip

shell > wget https://pypi.python.org/packages/source/p/pip/pip-6.1.1.tar.gz#md5=6b19e0a934d982a5a4b798e957cb6d45shell > tar zxf pip-6.1.1.tar.gzshell > cd pip-6.1.1 ; python setup.py installshell > ln -s /usr/local/python2.7/bin/pip /usr/bin/pip

## 這樣 pip 也安裝好了,當然,有了 easy_install 就可以直接 easy_install pip 了,源碼只是另外一種安裝方式

4、安裝 ipython

shell > wget https://pypi.python.org/packages/source/i/ipython/ipython-3.1.0.tar.gz#md5=a749d90c16068687b0ec45a27e72ef8fshell > tar zxf ipython-3.1.0.tar.gzshell > cd ipython-3.1.0 ; python setup.py installshell > ln -s /usr/local/python2.7/bin/ipython /usr/bin/ipython

## 這樣 ipython 也安裝好了,同樣可以通過 pip install ipython 來快速安裝

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 曲阳县| 黄石市| 名山县| 皋兰县| 上栗县| 丰都县| 和林格尔县| 三都| 明光市| 德保县| 错那县| 舞钢市| 连州市| 昭通市| 荥经县| 额济纳旗| 浮梁县| 子洲县| 莱西市| 昆明市| 习水县| 海宁市| 通河县| 三穗县| 多伦县| 泸溪县| 石首市| 上虞市| 遂昌县| 如皋市| 政和县| 瑞昌市| 龙井市| 老河口市| 麻城市| 平邑县| 新和县| 农安县| 阳新县| 黄浦区| 浪卡子县|