Sample Header Ad - 728x90

Install a Python package on Debian/Devuan when apt has no package for it

9 votes
2 answers
9442 views
I want to install some Python package pandasql system-wide, on a Devuan (or Debian) system. It's in the Python Package Index, but - there doesn't seem to be a (dpkg) package for it; let's assume that there actually isn't. Now, if I try to pip install pandasql, I get a message suggesting I use a virtual environment:
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.11/README.venv for more information.
... but virtual environments are not what I want to do: I want to install foo system-wide. How can I do that? *Notes*: * If possible, please answer more generally than just regarding pandasql. * Devuan Excalibur (~= Debian Trixie), Python 3.11.6, x86_64 machine
Asked by einpoklum (10753 rep)
Nov 13, 2023, 10:17 AM
Last activity: Jan 22, 2024, 06:57 AM