To Fix error in mongoengine setup command: use_2to3 is invalid Error just Upgrade MongoEngine. If you are using python 2 then just Upgrade MongoEngine to >= 0.20. It will help you.