python3 pip ipython 安裝

1.安裝Python3.6

安裝準備

mkdir /usr/local/python3 wget --no-check-certificate https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz tar -xzvf Python-3.6.0.tgz cd Python-3.6.0

編譯安裝

./configure --prefix=/usr/local/python3
make && make install

將默認Python修改成Python3.6,併爲其建立軟鏈接

mv /usr/bin/python /usr/bin/python.bak ln -s /usr/local/python3/bin/python3 /usr/bin/python

修改yum使用的原python的配置文件

vim /usr/bin/yum
#!/usr/bin/python --> #!/usr/bin/python2.7 vim /usr/libexec/urlgrabber-ext-down #!/usr/bin/python --> #!/usr/bin/python2.7

2.安裝pip3

安裝pip依賴庫

yum -y install zlib zlib-devel

若是安裝上述依賴庫出現如下報錯:Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
請執行如下操做:yum provides '*/applydeltarpm',出現上述問題的緣由是缺乏增量RPM條件,須要使用上述命令插敘具體缺乏的套件名稱,並進行安裝。html

安裝setuptools

Python的包管理工具,安裝其餘模塊依賴此模塊支持。python

wget --no-check-certificate  https://pypi.python.org/packages/source/s/setuptools/setuptools-19.6.tar.gz#md5=c607dd118eae682c44ed146367a17e26 tar -zxvf setuptools-19.6.tar.gz cd setuptools-19.6 python3 setup.py build python3 setup.py install 

若是提示:zlib須要安裝zlib-devel,並從新編譯安裝Python3.6nginx

安裝pip,併爲其建立軟鏈接

wget --no-check-certificate https://github.com/pypa/pip/archive/9.0.1.tar.gz tar -zvxf 9.0.1 -C pip-9.0.1 cd pip-9.0.1 python3 setup.py install ln -s /usr/local/python3/bin/pip /usr/bin/pip3

升級pip

pip3 install ipythonpip3 install --upgrade pip

ln -s /usr/local/python3/bin/ipython /usr/bin/ipython3git

cmdgithub

pythonsql

pip install pygamevim

python -m pygame.examples.aliensruby

pycharm 導入pygameapp

https://www.cnblogs.com/LHJL8023/p/8441016.htmlide

相關文章
相關標籤/搜索