首先打开终端输入命令
sudo passwd root
![](https://i-blog.csdnimg.cn/blog_migrate/a9336af6bc9377a975dc3473e04ddfae.png)
pycharm激活码 http://idea.liyang.io
347DQLVO7L-eyJsaWNlbnNlSWQiOiIzNDdEUUxWTzdMIiwibGljZW5zZWVOYW1lIjoi5b285bK4IHNvZnR3YXJlMSIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA2In0seyJjb2RlIjoiUlMwIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA2In0seyJjb2RlIjoiV1MiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDYifSx7ImNvZGUiOiJSRCIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNiJ9LHsiY29kZSI6IlJDIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA2In0seyJjb2RlIjoiREMiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDYifSx7ImNvZGUiOiJEQiIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNiJ9LHsiY29kZSI6IlJNIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA2In0seyJjb2RlIjoiRE0iLCJwYWlkVXBUbyI6IjIwMTktMDUtMDYifSx7ImNvZGUiOiJBQyIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNiJ9LHsiY29kZSI6IkRQTiIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNiJ9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA2In0seyJjb2RlIjoiUFMiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDYifSx7ImNvZGUiOiJDTCIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNiJ9LHsiY29kZS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xFjnye8NT1PAywoyl7RmiAVRE/EKwIDAQABo4GZMIGWMAkGA1UdEwQCMAAwHQYDVR0OBBYEFGEpG9oZGcfLMGNBkY7SgHiMGgTcMEgGA1UdIwRBMD+AFKOetkhnQhI2Qb1t4Lm0oFKLl/GzoRykGjAYMRYwFAYDVQQDDA1KZXRQcm9maWxlIENBggkA0myxg7KDeeEwEwYDVR0lBAwwCgYIKwYBBQUHAwEwCwYDVR0PBAQDAgWgMA0GCSqGSIb3DQEBCwUAA4ICAQC9WZuYgQedSuOc5TOUSrRigMw4/+wuC5EtZBfvdl4HT/8vzMW/oUlIP4YCvA0XKyBaCJ2iX+ZCDKoPfiYXiaSiH+HxAPV6J79vvouxKrWg2XV6ShFtPLP+0gPdGq3x9R3+kJbmAm8w+FOdlWqAfJrLvpzMGNeDU14YGXiZ9bVzmIQbwrBA+c/F4tlK/DV07dsNExihqFoibnqDiVNTGombaU2dDup2gwKdL81ua8EIcGNExHe82kjF4zwfadHk3bQVvbfdAwxcDy4xBjs3L4raPLU3yenSzr/OEur1+jfOxnQSmEcMXKXgrAQ9U55gwjcOFKrgOxEdek/Sk1VfOjvS+nuM4eyEruFMfaZHzoQiuw4IqgGc45ohFH0UUyjYcuFxxDSU9lMCv8qdHKm+wnPRb0l9l5vXsCBDuhAGYD6ss+Ga+aDY6f/qXZuUCEUOH3QUNbbCUlviSz6+GiRnt1kA9N2Qachl+2yBfaqUqr8h7Z2gsx5LcIf5kYNsqJ0GavXTVyWh7PYiKX4bs354ZQLUwwa/cG++2+wNWP+HtBhVxMRNTdVhSm38AknZlD+PTAsWGu9GyLmhti2EnVwGybSD2Dxmhxk3IPCkhKAK+pl0eWYGZWG3tJ9mZ7SowcXLWDFAk0lRJnKGFMTggrWjV8GYpw5bq23VmIqqDLgkNzuoog==
|
报 错:ModuleNotFoundError: No module named 'pip'
wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate
sudo python get-pip.py
sudo apt-get install python3-pip
sudo apt-get install python3-distutils
1.升级python包管理工具pip
pip install --upgrade pip
备注:当你想升级一个包的时候 `pip install --upgrade 包名`
2.python虚拟环境安装
sudo apt-get install python-virtualenv
sudo easy_install virtualenvwrapper
上述工具装好后找不到mkvirtualenv命令,需要执行以下环境变量设置。
1.创建目录用来存放虚拟环境
mkdir $HOME/.virtualenvs
2.在~/.bashrc中添加行:
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
3.运行:
source ~/.bashrc
3.创建python虚拟环境
mkvirtualenv [虚拟环境名称]
workon [虚拟环境名称]
4.退出虚拟环境 离开 deactivate
5.删除(慎用)
rmvirtualenv [虚拟环境名称]