烧瓶已安装,但ModuleNotFoundError:没有名为“烧瓶"的模块 [英] flask installed, but ModuleNotFoundError: No module named 'Flask'

查看:68
本文介绍了烧瓶已安装,但ModuleNotFoundError:没有名为“烧瓶"的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Mac上安装了烧瓶,

i have flask installed in my Mac,

pip list | grep Flask
Flask       1.0.2   

但是当我执行python文件时,它显示类似

but when i execute a python file, it shows error like

from Flask import Flask, render_template
ModuleNotFoundError: No module named 'Flask'

用于python和flask的目录是

the directories used for python and flask are

which python
/usr/bin/python

which flask
/Library/Frameworks/Python.framework/Versions/3.5/bin/flask

所以我想到了运行virtualenv,但是我什至无法安装它并显示错误消息

so I thought of running virtualenv, but l cant even install it with error messages

s3transfer 0.1.8 requires botocore<2.0.0,>=1.3.0, which is not installed.

然后我尝试

sudo pip install "botocore<2.0.0,>=1.3.0"
Cannot uninstall 'six'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

这是由于python版本冲突而发生的吗?有人可以帮忙吗?

Is this happening because of conflicting python versions? can anyone help please?

推荐答案

烧瓶模块名称应小写.

from flask import Flask

这篇关于烧瓶已安装,但ModuleNotFoundError:没有名为“烧瓶"的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆