8 ms·
Currently the startup time is often the last of the problem when using python for CLI tools. The python ecosystem is terrible for CLIs. It is very hard to ship
by adev_ 2y ago
Currently the startup time is often the last of the problem when using python for CLI tools. The python ecosystem is terrible for CLIs.
It is very hard to ship reliably and consistently standalone tools to users in Python without bundling the damn interpreter in a giant blob/archive with the program itself.
The packaging ecosystem and import system of Python is a mess:
- Any PYTHONPATH entry on the target user machine might break your tool (hello bashrc).
- Any globally installed python package on the system ( /lib/python3.X/site-packages ) might break your tool.
- Any python package present in the user home directory might break your tool ( e.g ~/.local/lib/python3.X ).
- Many python packages have binary dependencies that do not respect the ManyLinux (https://peps.python.org/pep-0513/ https://peps.python.org/pep-0513/) standard and have random ABIs issues with systems with different compilers / libc.
- Some user mix in their environment Conda and system packages all together with different libc and that blow up with random errors on package import.
- Add on top of that, you have the problems with the versioning of python itself.
This is honestly insane. It is a major usability pain compared to a simple "unpack and run" of a Golang, C++ or Rust binary.