If you don't mind adding a pyproject.toml, you could use pipx[1] to install these scripts. The directory structure would look like this:
<name>/
pyproject.toml
<name>.py
The pyproject.toml would look like this (using poetry, but you could use a different tool for this): [tool.poetry]
# NOTE: Set <name> to your project name
name = "<name>"
description = "My Script"
version = "0.0.0"
authors = ["Me <me@example.com>"]
[tool.poetry.dependencies]
python = "^3.11"
requests = "^2.28.2"
[tool.poetry.scripts]
# NOTE: Change <name> to match your package name in [tool.poetry]
<name> = "<name>:main"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Then you'd run `pipx install -e .` and the the executable script will be installed in ~/.local/bin.