Getting error from subprocess module - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Getting error from subprocess module (/thread-21136.html) |
Getting error from subprocess module - swechsler - Sep-16-2019 I'm writing a script to log disk usage on all our hosts to a central DB server. This works fine on one host, but on a different host I'm getting an error: Both hosts are running CentOS 7 and Python 3.6.8Doing a little more investigation, I was able to replicate the problem on the first host by running pip3 install subprocess.run . I then ran pip3 uninstall subprocess.run on both hosts and was able to get things working again. I was unaware that Python includes the subprocess.run module, but apparently the version installed with Pip is faulty? Can someone explain what happened here? RE: Getting error from subprocess module - Gribouillis - Sep-16-2019 It seems that there is a package named subprocess.run in pypi. It's probably not what you want. From your error message this package doesn't support a list as the first argument of run(). RE: Getting error from subprocess module - snippsat - Sep-16-2019 (Sep-16-2019, 02:08 PM)swechsler Wrote: I was unaware that Python includes the subprocess.run module, but apparently the version installed with Pip is faulty? Can someone explain what happened here?subprocess added the run() function in 3.5,not related to the 3-party PyPi module. subprocess Wrote:The run() function was added in Python 3.5; |