linux下裝python3以及pip3

1.安裝python3以及pip的過程python

 wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz 

 tar zxvf Python-3.6.0.tgz  

 ./configure —prefix=/etc/python/python3.6 

 yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel   #確保pip的時候不會有出錯

make && make install

ln -s /etc/python/python3.6/bin/python3.6 /usr/bin/python3

 ln -s /etc/python/python3.6/bin/pip3.6 /usr/bin/pip3

pip3 install requests
相關文章
相關標籤/搜索