For larger Python packages which might interfere with other packages it is recommended to install them into their own virtual environment and some Python packages expose CLI commands to the shell.
Is there a way to pip-install such a package into its own virtual environment, but have the CLI commands accessible from a normal shell without switching beforehand manually to this virtual environment?
Here an example: When I install csvkit via
pip install csvkit
I have the commands csvcut, csvlook, csvgrep and others available in my
shell. However if I do not want to install cvskit in my System-Python and
install it in a virtual environment, say at ~/venvs/csvkit, I have
csvkit only available if I have manually activated the environment
csvkit.
Is there a way to create the virtual environment and install csvkit in it,
so that the commands like csvcut activate the environment themselves before
they run?