Forums

migrating web app with virtualenv from 2 to 3

I have a small web app that I originally built on 2.7, using a virtualenv. I have migrated the code to 3.5 (mostly to avoid the InsecurePlatformWarning SSL error), on my local machine I just created and activated a new 3.5 venv, and the new code now runs fine against 3.5.

Can I do the same on PA? Or do I need to go through the standard process:

delete web app and create a new one

Obviously just deploying a new venv is easier. Thank you.

You can just make a new 3.5 virtualenv on PythonAnywhere and install the packages you need, then change the Python version of your web app and change the virtualenv to the new one. Reload your web app and everything should work.

Thanks, this worked.