- 指定源
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
pip install -i https://pypi.douban.com/simple django==1.11.4
- ubuntu
#1. 安装pip
apt install python3-pip
#2. 安装Django
pip3 install django
pip3 install djangorestframework
注释掉36行错误:/usr/local/lib/python3.8/dist-packages/django/db/backends/mysql/base.py
pip3 install django-redis
#3 安装pymysql
pip3 install pymysql
#4 安装altair
pip3 install altair vega_datasets -i https://pypi.tuna.tsinghua.edu.cn/simple
#5 创建数据库
>mysql -h localhost -u root -p
CREATE DATABASE IF NOT EXISTS yourdbname DEFAULT CHARSET utf8 COLLATE utf8_general_ci;