Summary of "You MUST WATCH THIS before installing PYTHON. PLEASE DON'T MAKE this MISTAKE."

Summary of “You MUST WATCH THIS before installing PYTHON. PLEASE DON’T MAKE this MISTAKE.”

This video provides a crucial guide for beginners on how to properly install Python and manage project dependencies using virtual environments. The presenter emphasizes common pitfalls beginners face when installing Python traditionally and explains why virtual environments are essential for avoiding conflicts between projects.


Main Ideas and Lessons


Step-by-Step Methodology for Installing Python and Setting Up a Virtual Environment (Windows)

  1. Download Python:

    • Go to python.org → Downloads.
    • Download the latest stable version (e.g., Python 3.8.3 at the time of the video).
  2. Prepare Directories:

    • Open Command Prompt.
    • Create a directory for Python installation (e.g., mkdir PIVERT).
    • Create a directory for Python projects (e.g., mkdir PIPROJ).
  3. Install Python (Custom Installation):

    • Run the Python installer.
    • Choose Customize installation.
    • Do NOT tick “Add Python to PATH” during this installation to avoid conflicts with existing Python versions.
    • Set the installation directory to the folder created earlier (e.g., PIVERT\Python3.8.3).
    • Complete the installation.
  4. Create a Virtual Environment:

    • Navigate to your project directory (cd PIPROJ).
    • Run the command to create a virtual environment: bash <path-to-python-executable> -m venv myenv Example: bash C:\Users\Giles\PIVERT\Python3.8.3\python.exe -m venv myenv
    • This creates a folder myenv containing an isolated Python environment.
  5. Activate the Virtual Environment:

    • On Windows, run: bash myenv\Scripts\activate
    • You will see the environment name (myenv) appear in the command prompt, indicating the environment is active.
  6. Use Python and Install Packages:

    • Run Python inside the environment: bash python
    • Test by printing or running commands like: python print("hello world")
    • Install packages using pip: bash pip install numpy
    • Packages installed here are isolated to this environment only.
  7. Deactivate the Virtual Environment:

    • When done, exit the environment by running: bash deactivate

Additional Notes


Speakers/Sources Featured


This guide is essential for anyone new to Python to avoid common installation and environment management mistakes and to ensure smooth project development workflows.

Category ?

Educational

Share this summary

Video