No module named flask.ext.restful

first to install flask-restful api use command:

pip install flask-restful

And import the package flask_restful,such as:

from flask_restful import Resource,reqparse, Api

I just met similar problem, My native language is not english, in that tutorial, it said uses flask restful by from flask.ext import restful, but it will throw out ModuleNotFoundError: No module named 'flask.ext'.

Finally in Flask-RESTful: english version Tutorial,

It shows the correct usage from flask_restful import Resource, Api.


You have installed Flask, but you haven't installed Flask-RESTful, it's not in your pip freeze list.

You can install it with pip install flask-restful.


I encountered the same problem and above code was unable to solve my problem. You can directly apply the below code:-

pip install Flask-API

This will help you install Flask-API and you don't need to individually update/load modules.

Tags:

Python

Flask