File "api_server.py", line 2, in <module> from flask import Flask ImportError: No module named flask
You need to install the flask module. In your command line (CMD) use the command:
"pip install flask"
I am encountering the same issue, and haven't figured out how to get the api_server.py file to run.
I followed the steps here to set up the virtual machine. Then, as instructed in Lesson 2: Accessing Public APIs - Part 5: Sending API Requests, I tried to run the server, and I get the output below:
vagrant@vagrant:/vagrant$ python api_server.py
Traceback (most recent call last):
File "api_server.py", line 2, in
When I try to install flask as suggested I get a further error.
vagrant@vagrant:/vagrant$ pip install flask
Traceback (most recent call last):
File "/usr/local/bin/pip", line 7, in
ImportError: No module named typing
I have tried various approaches such as this one from stack overflow to allow pip to install flask without success. Can someone help me determine what is going run, such that the VM doesn't work per instructions?