sudo yum install epel-release
## 安裝python3:(python36是python3加一些pip等元件),可以去掉 -y 檢視
sudo yum install -y python36
[root@lm graduate_work]
# python3 --version
python 3.6.8
[root@lm build]
# whereis python
python: /usr/bin/python /usr/bin/python2.7 /usr/bin/python3.6 /usr/bin/python3.6m /usr/lib/python2.7 /usr/lib/python3.6 /usr/lib64/python2.7 /usr/lib64/python3.6 /etc/python /usr/include/python2.7 /usr/include/python3.6m /usr/share/man/man1/python.1.gz
[root@lm build]
# ll /usr/bin/python
lrwxrwxrwx. 1 root root 7 2月 17 01:36 /usr/bin/python -> python2
[root@lm build]
# ln -s /usr/bin/python3.6 /usr/bin/python
ln: 無法建立符號鏈結"/usr/bin/python"
: 檔案已存在
[root@lm build]
# rm /usr/bin/python
[root@lm build]
# ln -s /usr/bin/python3.6 /usr/bin/python
[root@lm build]
# python --version
python 3.6.8
[root@lm build]
# pip --version
bash: pip: 未找到命令
[root@lm build]
# whereis pip
pip: /usr/bin/pip3.6
[root@lm build]
# ln -s /usr/bin/pip3.6 /usr/bin/pip
[root@lm build]
# pip --version
pip 9.0.3 from /usr/lib/python3.6/site-packages (python 3.6)
[root@lm build]
# yum
file "/usr/bin/yum", line 30
except keyboardinterrupt, e:
^syntaxerror: invalid syntax
[root@lm build]
# vim /usr/bin/yum
[root@lm build]
# cat /usr/bin/yum | head -1
#!/usr/bin/python2.7
downloading packages:
file "/usr/libexec/urlgrabber-ext-down", line 28
except oserror, e:
^syntaxerror: invalid syntax
file "/usr/libexec/urlgrabber-ext-down", line 28
except oserror, e:
^syntaxerror: invalid syntax
由於使用者取消而退出
[root@lm build]
# vim /usr/libexec/urlgrabber-ext-down
[root@lm build]
# cat /usr/libexec/urlgrabber-ext-down | head -1
#! /usr/bin/python2.7
您在 /var/spool/mail/root 中有郵件
[root@lm download]
# cat /var/spool/mail/root
from [email protected] fri mar 12 14:01:01 2021
return-path:
x-original-to: root
delivered-to: [email protected]
received: by lm.localdomain (postfix, from userid 0)
id 488f220bceb8; fri, 12 mar 2021 14:01:01 +0800 (cst)
from: "(cron daemon)"
subject: cron run-parts /etc/cron.hourly
content-type: text/plain; charset=utf-8
auto-submitted: auto-generated
precedence: bulk
x-cron-env:
x-cron-env:
x-cron-env:
x-cron-env:
x-cron-env:
x-cron-env:
x-cron-env:
x-cron-env:
x-cron-env:
message-id: <[email protected]>
date: fri, 12 mar 2021 14:01:01 +0800 (cst)
/etc/cron.hourly/0yum-hourly.cron:
file "/usr/sbin/yum-cron", line 256
except exception, e:
^syntaxerror: invalid syntax
[root@lm download]
# vim /usr/sbin/yum-cron
[root@lm download]
# cat /usr/sbin/yum-cron | head -n 1
#!/usr/bin/python2.7 -tt
arst打卡第97周[97/521] centos7安裝python的MySQLdb模組
sudo pip install mysql python如果遇到找不到mysql config檔案時,要先安裝 mysql community devel sudo yum install mysql community devel 然後重新sudo pip install mysql pytho...
centos7安裝python的MySQLdb模組
pip install mysql python 如果遇到找不到mysql config檔案時,要先安裝 mysql community devel 安裝mysql源 rpm ivh yum install mysql community devel 然後重新pip install mysql py...
centos7 安裝centos桌面
一 輸入命令 yum groupinstall gnome desktop graphical administration tools 二 設定系統啟動等級。systemctl get default 獲取當前系統執行形式,會顯示multi user.target 命令列終端 或者 graphic...