{
  "id": 7131595,
  "title": "FAQ: Which Binary Did python Hit?",
  "url": "https://urgent.news/2026/09/13/faq-which-binary-did-python-hit",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-13T16:09:55.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/gitlab_3188/faq-which-binary-did-python-hit-2d0"
  },
  "original_language": "en",
  "account": "This article aims to clarify which binary actually ran when you type \"python\" on different systems. The confusion arises from treating \"python\" as the binary itself, when in reality, it's just a name for an executable. The binary's location is stored in its path, not in the name. The article highlights four common myths about this process:\n\nMyth 1: \"python equals python3\" - This is not always true. On some systems, \"python\" may not exist, or it might be a symlink to \"python3\". To verify, use \"type python\" and \"type python3\", \"command -v python\" and \"command -v python3\", and \"readlink -f $(command -v python3)\". If \"command -v python\" prints nothing, the agent's python line has already failed.\n\nMyth 2: \"Creating a venv switches later commands\" - A virtual environment is a directory, not a session that influences subsequent commands. The interpreter you use after creating a venv might still be the system's python3, not the one in your venv. Verify by running \"command -v python3\" after creating a venv.\n\nMyth 3: \"The shebang the model wrote ran\" - The shebang (the line starting with \"#!\") in a script shows the interpreter path, but it doesn't mean that interpreter was automatically used. The interpreter used depends on how you call the script (e.g., \"./script.py\" uses the shebang, while \"python3 script.py\" doesn't). Verify by running \"./script.py\" and \"python3 script.py\".\n\nMyth 4: \"pip install hits the interpreter you used\" - Installing packages with pip uses the interpreter specified in the PATH, not necessarily the one you used to run pip. To ensure you're using the correct interpreter, run \"python3 -m pip --version\" or \".venv/bin/python -m pip --version\" depending on your setup.\n\nMyth 5: \"A success sentence means the path is yours\" - A model or chat may report that tests passed, but this doesn't guarantee that the correct interpreter path was used. To confirm, run \"python3 -c 'import sys, os; print(sys.executable)'\". This prints the path of the interpreter that would be used if you ran the script. Always verify the interpreter path, not just the success message.",
  "summary": "Ever trust a chat that said tests passed? Then watch the import fail on the box? The chat summary still looks clean and final. The binary on disk is a different story. This FAQ is not about clever prompts. It is about which file actually ran. A free model will type python with confidence. A free server will resolve that name somehow. Those two steps are not one contract. Why do we keep treating…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}