How to deploy project on PythonAnywhereΒΆ

  • Use pip to install To do this, open the bash console and run the following command (for Python 3.7):

    pip3.7 install --user
  • Create a zip archive of your project folder, upload the archive in the Files tab and unzip it.

    We assume that you are registered as username and your project is now located in the /home/username/project_folder directory.

  • Open the Web Tab. Add a new web app. In the Code section specify

    • Source code: /home/username/project_folder

    • Working directory: /home/username/project_folder

    In the WSGI configuration file:/var/www/ file add the following code

    import os
    import sys
    path = '/home/username/project_folder'
    if path not in sys.path:
    from jam.wsgi import create_application
    application = create_application(path)
  • Reload the server.