As part of migrating from ndb to cloud-ndb with GAE Python 2, you need to add the following to appengine_config.py:
import pkg_resources
from google.appengine.ext import vendor
vendor.add('lib')
pkg_resources.working_set.add_entry('lib')
When running locally with dev_appserver.py, I get an error that pkg_resources can't be found.
How do I fix this?
I found out that you don't need
pkg_resourceswhen running locally withdev_appserver.py. It is only needed for deployment.Although I couldn't fix the problem, a good workaround is to update
appengine_config.pyto this:With this modification, it works both locally and when deployed.