Summery

In the past, you’d install python modules and libraries by simply running pip <module> and that’s all. Now, for security and clarity sake this is no longer usually supported, and there three main ways to install python dependencies - venv, pipx and uv

You can install things with pip if you explicidly allow it, but it may cause conflicts. You can consider it if you need something very widely presumibly in all of your environments, long term.

As of late, uv became a big thing and it makes the installation and managmenent of python packages a lot easier. Still, as mentioned below, there are other ways to go about Python package managmenet.

Installing modules

Modules are the big commands that you run in a command like serverupload. You usually just install them with pipx install.
You can also install those with uv.

Installing libraries

Libraries are usually all those dependencies inside of a python code that starts with importz <XYZ>. You need to install them in separate environments and the run the scripts that need them inside those environments too:
python -m venv my-venv - Create an environment in your current directory
my-venv/bin/pip install aerospike - Install what you need or my-venv/bin/pip install -r requirements.txt - Install the required dependencies
my-venv/bin/python3 49067.py - Run the original script in your new environment’s context
You can also install those with uv.