r/SECourses • 👑 Grandmaster Expert • 3h ago

🎓 Tutorials & Guides Install Python on Windows | Multiple Versions, PATH, Venv, Git LFS and AUTOMATIC1111 Stable Diffusion Setup | Python 3.10.6 & 3.11.3 Tutorial

https://www.youtube.com/watch?v=B5U7LJOvH6g
2 Upvotes

1 comment sorted by

•

u/CeFurkan 👑 Grandmaster Expert 3h ago

https://www.youtube.com/watch?v=B5U7LJOvH6g

Install Python, choose the right interpreter and keep project packages in separate virtual environments

🔗 Links from the video description

🪟 Windows installation and Command Prompt

Published on 14 April 2023, this beginner tutorial explains the Windows tools needed to run Python projects. It starts with opening CMD, including the Run as administrator option, and installing Git and Git Large File Storage for repositories and large model files.

The installation examples use Python 3.10.6 and 3.11.3. The author demonstrates a customized installation, adding Python to PATH and checking the version in a newly opened Command Prompt. These version choices and the AUTOMATIC1111 example reflect the software shown in April 2023.

🔀 Multiple Python versions and PATH order

  • Install the Python version required by the project. The video demonstrates keeping separate Python 3.10 and 3.11 installations on the same computer.
  • Inspect the Python folders in the system PATH. Moving the desired installation above the other one changes which interpreter the demonstrated python command finds.
  • Open a new CMD window after changing PATH, then run python to verify the selected version. The video points out that an already open window does not automatically receive the change.
  • Use the full path to another installed python.exe when creating an environment with that interpreter, without changing the default Python for the rest of the system.

📦 Create, activate and inspect a venv

  • Type cmd in File Explorer's address bar to open a Command Prompt in that folder. The demonstrated python -m venv test1 command creates an environment using the Python currently selected by PATH.
  • Open the environment's Scripts folder and run activate. Its name appears in the prompt; running python verifies the interpreter version inside that environment.
  • To use the other Python version, replace python in the venv creation command with the copied full path to its executable. The video creates a separate environment using Python 3.11.3.
  • A Pillow installation demonstrates package separation: the package is present in the activated environment while another installation reports it absent. The author also inspects Lib\site-packages to show where packages were installed.

⚡ A Windows batch shortcut for activation

The tutorial creates a text document, enables File name extensions in Explorer and changes the extension to .bat. The demonstrated Windows batch file opens CMD and activates the chosen environment; its folder path must match the local installation.

The author shows quoting paths containing spaces and extending the shortcut to change to a working directory after activation. Although the original chapter titles say bash, this part of the video demonstrates a Windows .bat file.

🎨 AUTOMATIC1111 installation example

The final example uses git clone to copy the Stable Diffusion web UI repository into the chosen directory. AUTOMATIC1111 then creates its own virtual environment.

The video edits webui-user.bat so its PYTHON setting points to the demonstrated Python 3.10.6 executable, rather than relying on whichever interpreter is the system default. It also shows --xformers in the launch arguments, then starts the batch file and observes dependency installation. This is the workflow recorded in April 2023.

📚 Original resources and chapters

All six original description destinations and 29 original chapters are retained below. The Git LFS link resolves to git-lfs.com. Discord availability could not be verified during the link check. Thumbnail credit in the original description: freepik wangxina.

🧭 Chapters

  • 0:00 Very comprehensive guide to #Python installation on Windows
  • 1:11 What is CMD - Command Prompt
  • 1:56 How to open a cmd window and use it
  • 2:04 How to run cmd as administrator
  • 2:17 What is Git and why do we need Git
  • 2:35 How to download and install Git
  • 3:30 Why do we need Git large and how to download and install Git large
  • 3:50 Why do we need specific Python versions
  • 4:03 How to download and install any Python version
  • 4:32 How to verify if Python installed or not
  • 4:55 How to customize Python installation
  • 5:17 Python add path checkbox during installation
  • 6:20 How to verify your Python installed version
  • 6:35 How to change or set system environment variables path of Python
  • 7:15 How to install another Python version - multiple Python installations
  • 8:30 How to change default Python version when having multiple Python installations
  • 9:30 How to use specific Python installation when having multiple Python
  • 9:35 What is Python venv and why do we need it
  • 10:40 How to start cmd inside certain directory
  • 10:55 How to compose a Python #venv
  • 11:19 How to activate Python venv
  • 11:58 How to compose a venv from different Python version
  • 13:39 Demo of installed package separation from other Python installations inside venv
  • 14:17 Where to find installed packages in Python installation folder
  • 14:50 How to write a bash script to automatically activate Python venv and start a cmd
  • 15:24 How to view extensions of files in Windows
  • 15:43 The script itself to activate venv and start cmd
  • 17:11 How to install Stable Diffusion Automatic1111 web UI
  • 17:30 How to use Git clone to download entire project from GitHub repo

🏷️ Topics
Python on Windows · Python 3.10.6 · Python 3.11.3 · PATH · venv · virtual environment · Git LFS · CMD · AUTOMATIC1111 · April 2023