Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. If you haven’t already, download and install Python 3.8: https://www.python.org/

    1. If you already have Python 3.7 or below installed, you must install Python 3.8 (you do not need to uninstall the other version(s)). This is because of a package dependency which requires Python 3.8 or greater.

    2. If you have Python 3.9 or above installed, you’re probably fine. Probably. The bootcamp was designed and tested on Python 3.8 so use a different version at your own risk.

  2. Open the console in the repository root.

    1. Example: C:\Users\Username\autonomy-bootcamp-2023

  3. Create a virtual environment called venv by running: [python] -m venv venv/ , where [python] is Python 3.8 (e.g. python , python38 ).

    1. You can check which version of Python it is by running [python] --version

    2. If you move the repository to a different path after creating a virtual environment, you will have to delete the venv directory and repeat this step.

    3. If you want to call the virtual environment by a different name, replace venv/ with the name you want. Virtual environments are identified by their path, so different projects with the same venv virtual environment name is fine.

      1. Example: C:\Users\Username\autonomy-bootcamp-2023\venv\ and C:\Users\Username\computer-vision-python\venv\ are different.

  4. 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

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

  6. Confirm the virtual environment uses Python 3.8: python --version

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

    2. Example output: Python 3.8.10

  7. Open requirements.txt

    1. MacOS: Remove +cu117 from both torch and torchvision

    2. Windows and Linux:

      1. If you have a CUDA capable GPU but don’t want to use it for some reason, change +cu117 to +cpu for both torch and torchvision

      2. If you don’t have a CUDA capable GPU, don’t change anything.

  8. Download and install required packages: pip install -r requirements.txt

    1. This will install in your virtual environment under venv . The rest of your system is unaffected.

  9. Done!

...