Python Error Module _posixsubprocess not used

Hi, I am running a subprocess with threads through the python shell and I get the following warning when I use the subprocess module.

"The _posixsubprocess module is not used, the reliability of the child process may be affected if your program uses threads."

What dose does this mean? How can I get rid of it?

+4
source share
2 answers

check if you can import _posixsubprocess manually, the subprocess is trying to import this code into it, if it import _posixsubprocess an exception, this warning is generated.

+3
source

The solution for me was as follows:

 pip uninstall subprocess32 pip install -U subprocess32 

Inside, I received a warning when I tried to import matplotlib :

 Python 2.7.13 (default, May 16 2017, 12:02:12) [GCC 6.2.0 20160901] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import matplotlib /home/methuselah/.local/lib/python2.7/site-packages/subprocess32.py:472: RuntimeWarning: The _posixsubprocess module is not being used. Child process reliability may suffer if your program uses threads. "program uses threads.", RuntimeWarning) >>> 

After reinstalling subprocess32 warning disappears:

 Python 2.7.13 (default, May 16 2017, 12:02:12) [GCC 6.2.0 20160901] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import matplotlib >>> 
+1
source

Source: https://habr.com/ru/post/1435217/


All Articles