Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
  1. Activate If you haven’t already, activate the virtual environment:

    1. Windows command prompt: venv\Scripts\activate.bat

    2. Windows Powershell: .\venv\Scripts\Activate.ps1

      1. If you get an error with: running scripts is disabled on this system

      2. Run: Set-ExecutionPolicy Unrestricted

      3. This allows you to run any Powershell scripts at will. For more detail: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.3

    3. Linux and MacOS: source venv/bin/activate

  2. You should now see (venv) in the prompt line.

  3. Confirm the virtual environment uses Python 3.811: python --version

    1. Literally use python , none of the fancy stuff above.

    2. Example output: Python 3.8.1011.9

  4. When you’re done developing, make sure to either close the terminal or run:

    1. Windows command prompt: venv\Scripts\deactivate.bat

    2. Everything else: deactivate

    3. This is important to avoid going to a different project and then accidentally polluting your current project’s virtual environment.