Forums

simple page after assigning a virtual environment

Dear all, As a newly created account in PythonAnywhere, I added a New web application from the "Web" button. All went good, when I hit configuration for kamuse.pythonanywhere.com In my browser:

Hello from Flask!

Next, created a virtual directory from bash console using: "mkvirtualenv flask-tutorial --python=python3.6", and I enter following Path to a virtualenv from the Web button and reload /home/kamuse/.virtualenvs/flask-tutorial

However, an Error log came out, and it stated:

File "/home/kamuse/mysite/flask_app.py", line 4, in <module> from flask import Flask.

Then it worked good, when I erased the path and reload.

After searching a while on google, still no clue to associate with the simple page after making a virtual environment. Can anyone suggest a solution to this problem? Thank you in advance for this guidance.

Kamus

You need to install Flask into you new virtual environement.

@fjl, it works after installing "pip install 'SQLAlchemy<1.4' flask flask-login flask-sqlalchemy mysql-connector-python". Thank you

Glad to hear that you made it work!