Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't it work anymore with Python 2.7 ? #3

Open
dragibus57 opened this issue Sep 25, 2016 · 1 comment
Open

Doesn't it work anymore with Python 2.7 ? #3

dragibus57 opened this issue Sep 25, 2016 · 1 comment

Comments

@dragibus57
Copy link

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']

`

@brbsix
Copy link

brbsix commented May 7, 2017

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 #4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants