Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to get version of python dependencies/modules, including external applications called via subprocess.Popen?
    primarykey
    data
    text
    <p>I have a set of python scripts that I run frequently on different machines that depend on a few external libraries as well as some other applications spawned via <code>subprocess.Popen</code>.</p> <p>As expected depending on the version of the installed modules and applications the output varies. To address this I would like to keep track of which versions were in use at runtime.</p> <p>In order to do this I've considered the following steps:</p> <ol> <li>Using <a href="http://docs.python.org/library/modulefinder.html" rel="nofollow noreferrer">modulefinder</a> to collect dependencies. </li> <li>Try to call <code>module.__version__</code>, <code>module.get_version()</code> or other common ways to store version information on each collected module. </li> <li>Collect all calls to <code>subprocess.Popen</code> and try to get a version number by parsing the output with different arguments such as -version, -v, -?, -h, ...</li> </ol> <p>Steps 2 and 3 could be greatly improved by the use of distribution specific (<a href="http://www.debian.org" rel="nofollow noreferrer">Debian</a> in my case) tools such as <a href="http://www.debian.org/doc/FAQ/ch-pkgtools.en.html" rel="nofollow noreferrer">dpkg</a> to get versions of installed packages. The downside is that it becomes not only OS but also distribution specific, however I do realize that the initial approach is extremely inefficient and error-prone, if functional at all.</p> <p>So my question is if there is any package out there to address this or if anyone has a better suggestion on how to implement it?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload