I am working on setting up the front end of a database to track theater costumes in Flask. Users need to be able to upload picture of the costumes, and I am attempting to use Flask-Uploads for this. I installed Flask Uploads and Flask Storage using these two commands:
pip install flask-uploads
pip install flask-storage
They seem to have installed correctly, but they depend on urllib2, which doesn't work properly. I'm not sure how to resolve these dependency errors from the downloaded apps. The error log is below.
File "/srv/http/projects/costumes/costume.wsgi", line 3, in <module>
from costumeServer import app as application
File "/srv/http/projects/costumes/costumeServer.py", line 6, in <module>
from flask.ext.storage import get_default_storage_class
File "/usr/lib/python3.5/site-packages/flask/exthook.py", line 81, in load_module
reraise(exc_type, exc_value, tb.tb_next)
File "/usr/lib/python3.5/site-packages/flask/_compat.py", line 32, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3.5/site-packages/flask_storage/__init__.py", line 17, in <module>
from ._base import *
File "/usr/lib/python3.5/site-packages/flask_storage/_base.py", line 13, in <module>
import urllib2
ImportError: No module named 'urllib2'
I tried installing urllib2 with
pip install urllib2
but that made no difference.