While some popular tools for running local Large Language Models (LLMs), like Ollama or LM Studio (which we'll cover later), often package everything you need, installing Python on your system is frequently beneficial, especially if you plan to explore beyond the most basic setups. Think of Python not just as a programming language, but as a foundational platform for a vast number of tools and libraries used in artificial intelligence and machine learning.
Many advanced LLM frameworks, libraries for fine-tuning models, or scripts for automating tasks are written in Python. Having it installed opens the door to using these resources later. Even if the specific tools you start with don't explicitly require it, installing Python now provides flexibility for future exploration.
transformers
, PyTorch
, and TensorFlow
, rely heavily on Python.Before installing, it's worth checking if Python is already present on your system, perhaps from other software installations. Open your command line or terminal (we'll cover this briefly in the next section) and try the following commands:
python --version
You might also need to try:
py --version
python3 --version
If you see a version number (like Python 3.9.7
or similar), Python 3 is installed. If you get an error message like "command not found," or if the reported version starts with 2.
(e.g., Python 2.7.18
), you should install a current version of Python 3. Most LLM tools work best with Python 3.8 or newer.
The most reliable way to install Python is from the official source:
brew
(macOS) or apt
/yum
(Linux) can also be used, but the official installer is often preferred for beginners.python --version
or py --version
on Windows, python3 --version
on macOS/Linux). You should now see the version number you just installed.pip
: The Python Package InstallerWhen you install Python, it typically comes bundled with a tool called pip
. This is the standard package manager for Python, used to install and manage additional libraries or software packages that other developers have created. You don't need to install pip
separately.
While we won't be installing specific Python packages just yet, you'll often see instructions that look like this:
pip install some-library-name
This command tells pip
to download and install the specified library (some-library-name
) from the Python Package Index (PyPI), a vast repository of Python software. Understanding that pip
is how you add extra functionality to your Python environment is helpful for later steps if you choose to use Python-based LLM tools.
In summary, while installing Python might not be strictly necessary for the very first steps with tools like Ollama or LM Studio, it's a recommended setup step. It prepares your system for a wider range of possibilities in the local LLM space and aligns with common practices in the broader AI and machine learning fields.
© 2025 ApX Machine Learning