Forums

How to add virtualenv into wsgi.py

Hi, guys, I am trying to deploy my flask app with virtualenv. I successfully created the virtualenv, and it works perfectly. Now, I have to add the pass to it into the wsgi-file. It is written in the instruction: 'If you're using a virtualenv, enter the path to it into the appropriate field near the top'. Could you please write me the line which I have to add to the code? It surely cannot be just /home/MyName/.virtualenvs/myvirtualenv, right?

You don't need to add anything to the code; if you go to the "Web" page inside PythonAnywhere, you'll see a "Virtualenv" section; in there, there is a field that you can edit -- that's where you put the name of the virtualenv that you created.