ImportError:没有名为flask.ext.uploads [duplicate]的模块

时间:2021-03-10 23:16:19

This question already has an answer here:

这个问题在这里已有答案:

I made a web server with Flask and python, and at one point I use Flask-Uploads. When I ran it, it worked originally, but when I moved it to another computer, it didn't work even though I installed all the packages correctly with pip. I have looked online for this error, and have found many solutions, but none of them work for me. If anyone has a way that could possibly help me, it would be greatly appreciated. The code that is getting the error is:

我用Flask和python创建了一个Web服务器,有一次我使用Flask-Uploads。当我运行它时,它最初工作,但是当我将它移动到另一台计算机时,即使我用pip正确安装了所有软件包,它也无法工作。我已经在网上看到了这个错误,并找到了很多解决方案,但它们都不适用于我。如果有人有办法可以帮助我,我将不胜感激。得到错误的代码是:

from flask.ext.uploads import UploadSet, configure_uploads, IMAGES

And I get the error:

我收到错误:

ImportError: No module named flask.ext.uploads

1 个解决方案

#1


0  

Install flask uploads module

安装flask上传模块

pip install flask-uploads

from flask_uploads import UploadSet, configure_uploads

#1


0  

Install flask uploads module

安装flask上传模块

pip install flask-uploads

from flask_uploads import UploadSet, configure_uploads