[Python] pip/pipx installation and adding path

Discussão em 'Python' iniciado por Stack, Maio 7, 2025.

  1. Stack

    Stack Membro Participativo

    I run Debian Stable on my box, and I want to install the Binance connector library to query Binance.

    I use pipx and everything seems to be OK (see below).

    sudo pipx install binance-connector --include-deps


    Output:

    ⚠️ Note: normalizer was already on your PATH at /usr/bin/normalizer
    installed package binance-connector 3.5.1, installed using Python 3.11.2
    These apps are now globally available
    - normalizer
    - wsdump
    ⚠️ Note: '/root/.local/bin' is not on your PATH environment variable. These
    apps will not be globally accessible until your PATH is updated. Run `pipx
    ensurepath` to automatically add it, or manually modify your PATH in your
    shell's config file (i.e. ~/.bashrc).
    done! ✨ ✨


    And:

    pipx ensurepath


    Output:

    /home/lorenzo/.local/bin is already in PATH.

    ⚠️ All pipx binary directories have been added to PATH. If you are sure you
    want to proceed, try again with the '--force' flag.


    And:

    sudo pipx ensurepath


    Output:

    [sudo] password for lorenzo:
    /root/.local/bin has been been added to PATH, but you need to open a new
    terminal or re-login for this PATH change to take effect.

    You will need to open a new terminal or re-login for the PATH changes to take
    effect.

    Otherwise pipx is ready to go! ✨ ✨


    At this point, I open a new shell, and I type:

    python3.11


    Output:

    Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from binance.spot import Spot
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    ModuleNotFoundError: No module named 'binance'


    Does anybody understand what is going wrong and why the Binance library is not found?

    Continue reading...

Compartilhe esta Página