1. Any third-party applications you have previously installed may need to be reinstalled. Libraries these applications depend on have been upgraded and your applicaiton may need to be upgraded too.

  2. Python virtual environments will generally need to be re-installed. The steps involved are - assuming you are already in the root directory of your project, and the virtual environment is installed in a dedicated subdirectory, venv:

    1. record the packages in the environment

      $ source venv/bin/activate
      (venv) $ pip freeze > frozen_requirements.txt
      (venv) $ deactivate
      
    2. remove the directory tree containing the environment If you had installed your virtual environment in a dedicated directory venv,

      $ rm -rf venv/
      

      Or, if your virtual environment is not in a dedicated directory, so you can see directories bin, lib, share, include in your root project directory

      $ rm -rf bin lib include share
      
    3. create a new virtual environment with the version of python you want to use

      $ python3 -m venv venv
      (venv) $ source venv/bin/activate
      
    4. re-install the packages recorded in your frozen_requirements.txt file:

      (venv) $ pip install -r frozen_requirements.txt
      

References

python_anywhere - rebuilding virtual environments

Changes to that documentation:

  • with python3 on your system, and no system python command: use the command

    python3 -m venv <venv_name>
    source <venv_name>/bin/activate