执行superset db upgrade报错:ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'

我的Python版本是:3.9【一路升级上来的,py3.7、py3.8都试过了】
数据源SQL server【接下来会分享连接SQL server遇到的大坑】

在进行初始化Supetset数据库:superset db upgrade命令时报错:ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
flask 2.2.2 requires Werkzeug>=2.2.2, but you have werkzeug 0.16.1 which is incompatible.
flask-login 0.6.2 requires Werkzeug>=1.0.1, but you have werkzeug 0.16.1 which is incompatible.
Successfully installed Werkzeug-0.16.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io
(base) [root@lxttest miniconda3]# pip install Werkzeug==1.0.1
Collecting Werkzeug==1.0.1
  Downloading Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 298.6/298.6 kB 137.0 kB/s eta 0:00:00
Installing collected packages: Werkzeug
  Attempting uninstall: Werkzeug
    Found existing installation: Werkzeug 0.16.1
    Uninstalling Werkzeug-0.16.1:
      Successfully uninstalled Werkzeug-0.16.1
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
flask 2.2.2 requires Werkzeug>=2.2.2, but you have werkzeug 1.0.1 which is incompatible.
Successfully installed Werkzeug-1.0.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io
(base) [root@lxttest miniconda3]# pip install Werkzeug==2.2.2

看:flask 2.2.2 requires Werkzeug>=2.2.2, but you have werkzeug 0.16.1 which is incompatible.

可当你执行了: pip install Werkzeug==2.2.2
错误依旧存在:

解决办法:一定要先统一Flask和Werkzeug框架的版本,不然问题还是无法解决。

pip uninstall Flask
pip uninstall Werkzeug

pip install Flask==2.0.2
pip install Werkzeug==2.0.2

可以参考一下这个博主的博客,虽说没能解决我的问题,但还是很值得借鉴:https://www.csdn.net/tags/MtjaAg5sMDk5NzItYmxvZwO0O0OO0O0O.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

walking_w

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值