Doesn't it work anymore with Python 2.7 ?
Hi, Take a look to this : `~ $ uname -v #57-Ubuntu SMP Tue Sep 6 15:42:33 UTC 2016
~ $ pip install subprocess.run Requirement already satisfied (use --upgrade to upgrade): subprocess.run in /usr/local/lib/python2.7/dist-packages ~ $ python Python 2.7.12 (default, Jul 1 2016, 15:12:24) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from subprocess import run Traceback (most recent call last): File "
", line 1, in ImportError: cannot import name run import subprocess dir(subprocess) ['CalledProcessError', 'MAXFD', 'PIPE', 'Popen', 'STDOUT', '_PIPE_BUF', 'all', 'builtins', 'doc', 'file', 'name', 'package', '_active', '_args_from_interpreter_flags', '_cleanup', '_demo_posix', '_demo_windows', '_eintr_retry_call', '_has_poll', 'call', 'check_call', 'check_output', 'errno', 'fcntl', 'gc', 'list2cmdline', 'mswindows', 'os', 'pickle', 'select', 'signal', 'sys', 'traceback', 'types'] `
This is because subprocess.run.pth isn't installed when the package is installed via pip install subprocess.run. If the package is installed via python setup.py install, it is. Unfortunately this means the package is presently unusable as a dependency.
I haven't looked into this issue too closely, but it appears that this is caused by the use of an absolute path that is passed to data_files in setup.py. Replacing get_python_lib() with get_python_lib(prefix='') should fix it. See https://github.com/xando/subprocess.run/pull/4.