linux系统如何安装python(linux安装python环境)
linux怎么安裝python3-pyqt5?
打開(kāi)終端sudo apt-get install python3-pyqt*這樣會(huì)安裝所有pyqt所需的組件
Linux服務(wù)器安裝ubuntu 20.0安裝python3?
今天記錄一下Linux安裝python3
其實(shí)發(fā)現(xiàn)Linux系統(tǒng)自帶python2,python命令是python2,如果安裝python3,則需要使用python3命令運(yùn)行程序。
python 循環(huán)和if判斷結(jié)束是根據(jù)縮進(jìn)(4個(gè)縮進(jìn))來(lái)的
如何在linux系統(tǒng)中安裝python?
linux系統(tǒng)中安裝python包括以下三個(gè)步驟:
1、下載源代碼
2、安裝
$ tar –jxvf Python-2.5.2.tar.bz2
$ cd Python-2.5.2
$ ./configure
$ make
$ make install
3、測(cè)試
在命令行下輸入python,出現(xiàn)python解釋器即表示已經(jīng)正確安裝。
在suse10或rhel5(es5)下系統(tǒng)默認(rèn)已經(jīng)裝了python但版本是2.4.x;本次安裝后在shell中輸入
#python
會(huì)發(fā)現(xiàn)顯示結(jié)果:
# python
Python 2.4.3 (#1, Dec 11 2006, 11:38:52)
on linux2
Type “help”, “copyright”, “credits” or “l(fā)icense” for more information.
>>>
版本還是2.4.x的
解決辦法:
#cd /usr/bin
#ll |grep python //查看該目錄下python
#rm -rf python
#ln -s PREFIX/Python-2.5.2/python ./python //PREFIX為你解壓python的目錄
#python
# python
Python 2.5.2 (#1, Dec 11 2006, 11:38:52)
on linux2
Type “help”, “copyright”, “credits” or “l(fā)icense” for more information.
>>>
安裝測(cè)試完畢。
總結(jié)
以上是生活随笔為你收集整理的linux系统如何安装python(linux安装python环境)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 饭局狼人 安卓(饭局狼人杀安卓)
- 下一篇: ddos攻击追回(DDoS攻击结余)