12 ms·
A development version of pipx supports a feature that address this pain point. See pull request #916 [1] In your script example.py, you would specify your depe
by Flimm 3y ago
A development version of pipx supports a feature that address this pain point. See pull request #916 [1]
In your script example.py, you would specify your dependencies in a special comment like this:
# Requirements:
# requests
import requests
...
Then you could run the script like this:
pipx run file:example.py
This would install the dependencies in a temporary virtual environment, and run the script in that virtual environment.
[1] https://github.com/pypa/pipx/pull/916 https://github.com/pypa/pipx/pull/916
- networked 3y agoThere is also fades (https://github.com/PyAr/fades https://github.com/PyAr/fades) and pip-run (https://github.com/jaraco/pip-run https://github.com/jaraco/pip-run). Debian and Ubuntu package fades.