title: ModuleNotFoundError: No module named 'apscheduler' in Flask
body: <p>I want to set up a <code>flask</code> server with a scheduler using <code>APScheduler</code>. </p>
  
  <p>Unfortunately <code>flask</code> doesn't want to run with <code>APScheduler</code> - it crashes at the imports.</p>
  
  <p>I tried <code>APScheduler==2.1.2</code> and use:</p>
  
  <pre><code>from flask import Flask
  from apscheduler.scheduler import Scheduler
  
  app = Flask(__name__)
  </code></pre>
  
  <p>I tried also the newest <code>APScheduler==3.6.3</code> and use:</p>
  
  <pre><code>from flask import Flask
  from apscheduler.schedulers.background import BackgroundScheduler
  
  app = Flask(__name__)
  </code></pre>
  
  <p>In both cases after running <code>flask run</code> I got:</p>
  
  <pre><code>Error: While importing "app", an ImportError was raised:
  
  Traceback (most recent call last):
    File "C:\(...)\Continuum\anaconda3\lib\site-packages\flask\cli.py", line 235, in locate_app
      __import__(module_name)
    File "C:\(...)\app\__init__.py", line 2, in &lt;module&gt;
      from apscheduler.schedulers.background import BackgroundScheduler
  ModuleNotFoundError: No module named 'apscheduler'
  </code></pre>
  
  <p>I tried installing <code>Apscheduler</code> with <code>pip</code>, <code>pip3</code> and <code>conda</code> - same results. I tried <code>Flask-APScheduler</code> - same reuslts.</p>
  
  <p><code>PyCharm</code> recognizes and hints the <code>APScheduler</code> (as well as <code>IPython</code>), but <code>flask</code> doesn't.</p>