日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程语言 > python >内容正文

python

Python系列之入门篇——python2.7.13安装

發(fā)布時(shí)間:2024/7/19 python 34 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Python系列之入门篇——python2.7.13安装 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

Python2.7.13 安裝

說明

以下所有操作都基于centos6.9

1. Issue

zlib zlib-devel是安裝setuptools依賴的模塊,需要在安裝python之前先安裝這兩個(gè)模塊

2. Install Base

#基礎(chǔ)依賴 yum -y install gcc gcc-c++ zlib zlib-devel openssl-devel#刪除當(dāng)前mysql版本 yum remove MySQL-server-5.6.21-1.el6.x86_64 MySQL-client-5.6.21-1.el6.x86_64 MySQL-devel-5.6.21-1.el6.x86_64#重新安裝mysql-dev yum -y install mysql-devel.x86_64

3. Install python2.7.13.tar.gz

cd /ddhome/usr/python2.7.13 ./configure make && make install which python mv /usr/bin/python /usr/bin/python2.6.6 ln -s /usr/local/bin/python /usr/bin/python

4. Install setuptools-33.1.1.zip

(pip 安裝需要用到setuptools模塊) cd /ddhome/usr/setuptools-33.1.1 python setup.py install

5. Install pip-9.0.1.tar.gz

cd /ddhome/usr/pip-9.0.1 python setup.py install

5.1 ssl

開啟ssl模塊,要不然pip安裝https請求的所有模塊都會(huì)失敗,而且必須在make之前完成
先配置python,即先運(yùn)行 ./configure, 會(huì)出現(xiàn)./Module/Setup文件

vim Module/Setup, 修改如下

# Socket module helper for socket(2) _socket socketmodule.c timemodule.c# Socket module helper for SSL support; you must comment out the other # socket line above, and possibly edit the SSL variable: #SSL=/usr/local/ssl _ssl _ssl.c \ -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ -L$(SSL)/lib -lssl -lcrypto

6 python的圖形編程接口, 使用matplotlib做圖時(shí)需要

# centos yum install -y tkinter tk-devel# ubuntu sudo apt-get install python-tk

7. Install pandas numpy matplotlib seaborn scipy hdfs pyinotify

python mysql lib: MySQL-python PyMySQL

MySQL-python 停止更新,不支持python3

PyMYSQL 支持python3

pip install matplotlib -i http://pypi.douban.com/simple --trusted-host pypi.douban.com pip install numpy -i http://pypi.douban.com/simple --trusted-host pypi.douban.com pip install pandas -i http://pypi.douban.com/simple --trusted-host pypi.douban.com pip install seaborn scipy -i http://pypi.douban.com/simple --trusted-host pypi.douban.com pip install hdfs MySQL-python interval

8.pyecharts相關(guān)依賴包

pip install pyecharts# Geo Data extensions pip install echarts-cities-pypkg# Map extensions pip install echarts-countries-pypkg pip install echarts-china-provinces-pypkg pip install echarts-china-cities-pypkg pip install echarts-china-counties-pypkg pip install echarts-china-misc-pypkg pip install echarts-united-kingdom-pypkg

轉(zhuǎn)載于:https://www.cnblogs.com/dzqk/p/8659726.html

總結(jié)

以上是生活随笔為你收集整理的Python系列之入门篇——python2.7.13安装的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。