首先设置Ubuntu更新源
https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo vim /etc/apt/sources.list
sudo apt-get update
pycharm历史版本https://www.jetbrains.com/pycharm/download/previous.html
pycharm设置
0.0.0.0 account.jetbrains.com
pip
安装pip
sudo apt-get install python-pip
升级pip
python -m pip install --upgrade pip
升级pip后输入 pip list 出现如下错误
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
from pip import main
ImportError: cannot import name main
输入如下命令
sudo vim /usr/bin/pip
修改如下
原文:from pip import main
修改后:from pip._internal import main
更新pip源
[global]
index-url = http://mirrors.aliyun.com/pypi/simple
trusted-host = mirrors.aliyun.com
安装虚拟环境
pip install virtualenv
pip install virtualenvwrapper
编辑~/.bashrc文件
sudo vim ~/.bashrc
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/workspace
source /usr/local/bin/virtualenvwrapper.sh
source ~/.bashrc
创建虚拟环境如果出现如下错误
Running virtualenv with interpreter /usr/bin/python3
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 20, in <module>
import distutils.spawn
ModuleNotFoundError: No module named 'distutils.spawn'
处理方式
sudo apt-get install python3-distutils
ubuntu 18.04 安装mysql不提示输入密码解决方案
https://blog.csdn.net/NeptuneClouds/article/details/80995759
redis安装
sudo apt-get install redis-server