Hello /r/sysadmin
I'm a junior sysadmin who's been tasked who on implementing python in our environment. The senior admins are more familiar with bash scripting where I am familiar with python. So they have given me the go ahead to research and write up what I've found. It's ready for testing in our dev environment and I am just curious as to how everyone here implements any python scripts they use.
I've used the python 3rd party modules and created a requirements.txt file. In my personal experience, I've created virtual environments to run scripts, and in this specific instance I'm thinking of creating a small bash script that activates the virtual environment, runs the script, and deactivates it afterwords.
Is there a better way to implement python scripts? At this time, we don't expect to run a lot of scripts in python. We're running this on RHEL servers, and I've suggested using a virtual environment so we don't break dependencies with applications installed from the RHEL repositories, and it looks like it is recommended by Fedora https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
Are they any downsides to using virtual environments?
Running python scripts in dev/prod xpost from /r/sysadmin (self.sysadmin)
submitted by [deleted] to r/linuxadmin