sqlalchemy 和 flask_sqlalchemy 无法导入
来源:2-6 目的:预习Flask
BBBBBBBB191
2021-09-15
sqlalchemy 和 flask_sqlalchemy 无法导入 也试过重新安装,但还是报错:
Traceback (most recent call last):
File “d:\fisher\app\models\test.py”, line 1, in
import sqlalchemy
ModuleNotFoundError: No module named ‘sqlalchemy’
(是因为现在版本太新了么)
附上PowerShell:
PS D:\fisher> pipenv graph
cymysql0.9.18
Flask-SQLAlchemy2.5.1
- Flask [required: >=0.10, installed: 2.0.1]
- click [required: >=7.1.2, installed: 8.0.1]
- colorama [required: Any, installed: 0.4.4]
- itsdangerous [required: >=2.0, installed: 2.0.1]
- Jinja2 [required: >=3.0, installed: 3.0.1]
- MarkupSafe [required: >=2.0, installed: 2.0.1]
- Werkzeug [required: >=2.0, installed: 2.0.1]
- click [required: >=7.1.2, installed: 8.0.1]
- SQLAlchemy [required: >=0.8.0, installed: 1.4.23]
- greenlet [required: !=0.4.17, installed: 1.1.1]
mysql==0.0.3
- greenlet [required: !=0.4.17, installed: 1.1.1]
- mysqlclient [required: Any, installed: 2.0.3]
requests==2.26.0 - certifi [required: >=2017.4.17, installed: 2021.5.30]
- charset-normalizer [required: ~=2.0.0, installed: 2.0.4]
- idna [required: >=2.5,<4, installed: 3.2]
- urllib3 [required: >=1.21.1,<1.27, installed: 1.26.6]
WTForms==2.3.3 - MarkupSafe [required: Any, installed: 2.0.1]
写回答
2回答
-
7七月
2021-09-19
所有课程所使用的flask、第三方库等的版本。
00 -
7七月
2021-09-16
python环境问题比较多,如果你不熟悉,建议和课程一样的版本,这样可以节约很多调试环境的时间。
012021-09-18
相似问题