In the Python subprocess docs it has been encouraged to substitute the default python2.7 subprocess module with subprocess32. How should I do that? Please give a detailed answer.
1 Answer
Assuming you are working in a python virtualenv
(as you should be doing), you can do:
pip install subprocess32
in the activated virtualen.
You can also install this as a package:
apt-get install -y python-subprocess32
But that doesn't get you the added functionality in any program running in a virtualenv, and since you should not use pip
installs on the system Python, you are limited (i.e. you should limit yourself to) in your python program to python modules available via apt-get
.