Creating an executable file from a python script

3 minute read Published:

Recently I wrote about how to deploy a python script without virtualenv. This method takes advantage of the idea of installing the script’s dependencies in a local directory using pip and wraps them and our code with a simple shell script. The result was good, but you still needed to deploy a directory with your source code, another one with the dependencies and the wrapper script with those paths fixed, which will be the one to run.

Deploying a python script without virtualenv

2 minute read Published:

Lately I’ve been writing a lot of python to script some common processes in a large infrastructure. Those scripts require some python libraries which are not part of the standard library nor installed by default in all systems. For example, I love how docopt manages the arguments of a python script, or using the YAML format for my config files instead of INI. During the development stage, I usually manage those dependencies using pip and virtualenv, but I would like my deployment to require only python3 installed in the remote machine.