我在Windows机器上启动了django项目,然后将数据库更改为我的sql,如下所示:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'django',
'USER': 'root',
'PASSWORD': '',
'HOST': 'localhost'
}
}
现在,当我想迁移表时,会出现此错误:
django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3.
但是当我运行带有版本的pip时,它说该版本不可用,如下所示:
pip install pymysql==1.3.14
,它返回此错误:
ERROR: Could not find a version that satisfies the requirement pymysql==1.3.14 (from versions: 0.3, 0.4, 0.5, 0.6, 0.6.1, 0.6.2, 0.6.3, 0.6.4.dev1, 0.6.4, 0.6.6, 0.6.7, 0.7.0, 0.7.1, 0.7.2, 0.7.
3, 0.7.4, 0.7.5, 0.7.6, 0.7.7, 0.7.8, 0.7.9, 0.7.10, 0.7.11, 0.8.0, 0.8.1, 0.9.0, 0.9.1, 0.9.2, 0.9.3)
ERROR: No matching distribution found for pymysql==1.3.14
你知道我该怎么办吗?