I'm trying to use flask-uploads for image upload feature in my flask app.
I used pip install Flask-Uploads
to install and pip install Flask-Uploads --upgrade
to upgrade the flask-uploads module.
But when I import it, it gives me an error, here's my import code:
from flaskext.uploads import UploadSet, configure_uploads, IMAGES
Error:
File "project.py", line 3, in <module>
from flaskext.uploads import UploadSet, configure_uploads, IMAGES
ImportError: No module named flaskext.uploads
I tried using an older version by doing pip install Flask-Uploads==0.1.3
even that doesn't work.
I'm using Windows 10.
Update: Suggested is the OP further drills down in changes of flask vs. flask-upload that introduced the incompatibility noted at the end of this troubleshooting aid / documentation. Maybe the maintainers of the packages even can provide answers, if the OP kindly asks them? When futher details are provided I offer to update this to a solution, but for now they seem to miss ...
**Answer [on hold] **
I think you missed a dot. Try:
instead of:
If the module is still not found, than check sys.path and check, if the installed module is in one of the visited places. Like so:
Empty is current working directory, rest are folder paths and if you know where the install stored the module
/usr/local/lib/python2.7/site-packages/flask_uploads.py
we know it finds it.Then if you encounter:
it tells you, that in
flask_uploads.py
of the install package, you cannot importModule
fromflask
.So:
Hm ... looks not so promising but someone or some place of changes documentation shoud show, when this import broke in flask-uploads.