Python bins fail to import library

Overview A binary (bin) file installed as part of a Python package, e.g. django-admin from Django will fail upon execution – even after successful installation via pip – because it cannot locate its corresponding Python library. Example: [myadmin@sol www]$ django-admin Traceback (most recent call last): File “/usr/local/bin/django-admin”, line 7, in <module> from django.core.management import execute_from_command_line portError: No module…

Using WSGI

Overview Python applications can be launched using Passenger offering improved throughput and lifecycle management. Launching CGI scripts wrapped by pyenv will yield very poor throughput as a result of multiple shell subprocesses necessary to ascertain the correct Python interpreter. Adapting a CGI application to WSGI improves throughput significantly by reducing overhead through a persistent process. Pages load quickly, and applications utilize…