Main Menu

search

You are here

Python Install error: "Externallty Managed Environment"

[last updated: 2025-12-20]
Disclaimers
Linux home page
Python home page
----------

  • This error was first encountered attempting to install tools for the ADS1115 16-bit ADC...
      sudo apt update
      sudo apt upgrade
      sudo apt install python3-pip
      sudo pip3 install --upgrade setuptools
        everything worked until this last one, that gave error: externally-managed-environment

    • Surfing and googling revealed the following solution:
        Create a "vitrual environment":
          python -m venv my-venv
          my-venv/bin/pip install [some-python-library]

    • Another recommended approach:
      • Use pipx as an alternative to pip3 if externally-managed-environment error is encountered
        sudo apt install pipx && pipx install [some-python-library]
        If using pipx, you should update $PATH by running:
        pipx ensurepath
      • I used this method to install ptap2 and meshtastic:
          sudo apt install pipx && pipx install pytap2
          pipx ensurepath
          pipx install "meshtastic[cli]"
          pipx ensurepath
          meshtastic --version ... returns 2.7.5

    -----------------------------------------


    eof