title: Flask-Script: from flask._compat import text_type ModuleNotFoundError: No module named 'flask._compat'
body: <p>When using Flask-Script I get an error when importing Manager.</p>
  <p>I have installed with pip Flask and Flask-Script. How do I fix this?</p>
  <p><strong>manage.py</strong></p>
  <pre><code>from flask_script import Manager
  
  from main import app
  
  manager = Manager(app)
  
  @manager.command
  def hello():
  
      print (&quot;hello&quot;)
  
  if __name__ == &quot;__main__&quot;:
      manager.run()
  </code></pre>
  <p><strong>main.py</strong></p>
  <pre><code>from flask import Flask
  
  app = Flask(__name__)
  </code></pre>
  <p><strong>Error</strong></p>
  <pre class="lang-none prettyprint-override"><code>(venv) raul@raul-PC:~/Proyectos Python/flask_script$ python3 manage.py hello
  Traceback (most recent call last):
    File &quot;manage.py&quot;, line 1, in &lt;module&gt;
      from flask_script import Manager
    File &quot;/home/raul/Proyectos Python/flask_script/venv/lib/python3.8/site-packages/flask_script/__init__.py&quot;, line 15, in &lt;module&gt;
      from flask._compat import text_type
  ModuleNotFoundError: No module named 'flask._compat'
  </code></pre>