How to run nameko with sudo

Hello, I have Ubuntu 20.04 and python 3.8 locally. I want to run nameko process with sudo.
sudo nameko run
sudo: nameko: command not found

This depends on your Python and shell setup. I guess that sudo is changing your path.

Nameko installs its CLI with setuptools. You can find the executable with which nameko. It will be in the bin directory of your python installation or virtualenv.

Also, check where pip install your dependencies, because Pip in Ubuntu 20.04 by default installs binaries in ~/.local/bin, which may not be available with sudo, since most config guides for Python in Ubuntu adds the ~/.local/bin path in ~/.bashrc