• Updated:

(pipx) Install Python tool globally

(ver otras herramientas de Python y como se integran con pipx)

Install

# install
py -m pip install --user pipx

# only the first time we install something 
pipx ensurepath
# close and open terminal again

Usage

# build, install and run with poetry to make sure everything works
poetry build
poetry install
poetry run

# install localy with pipx
pipx install .

# now we're able to run it from anywhere
file-enlarger

in this case we invoke it as file-enlarger as the .toml declares it as such

[tool.poetry.scripts]
file-enlarger = "file_enlarger.enlarge_file:main"

pipx not working?

Check this thread. The key for me was deleting C:\Users\<username>\pipx

Alternative

Install your program with

# install
py -3.14 -m pip install --user .

# find installation to add to PATH
py -3.14 -m pip show fileenlarger

# add it to PATH; logout; restart console
file-enlarger

This will install it in your local /scripts or /Roaming folder. Remember to add it to your path. In this case it’s in

C:\Users\{user}\AppData\Local\Python\pythoncore-3.14-64\Scripts
C:\Users\{user}\AppData\Roaming\Python\Python314\site-packages