Closed capsulecorplab closed 4 years ago
@capsulecorplab you are correct, it is bad practice, (preference technically) to install Python packages system-wide. However, this code was built with the understanding that it will run in AWS Robomaker - which is ephemeral computing. There isn't a "user-space" vs "system-space" within a Robomaker simulation job. Indeed, the only way the code will run in an automated fashion is via a system-wide installation, hence the current design.
Line 7 - 9 of setup.sh uses
sudo pip3 install
for installing python packages. This installs python packages to the system-wide path and is generally considered bad practice. It is better (and more common ) practice to use a virtual environment, such as virtualenv, to manage the installation of python packages for a project. See Is it acceptable and safe to run pip install under sudo?If it is of interest to install all python packages in a single installation script, consider specifying the minimum package requirements in an
install_requires
in asetup.py
. See https://packaging.python.org/guides/distributing-packages-using-setuptools/#install-requires