[Tutor] pip install of subprocess module

Derek Smith DerekSmith at racksquared.com
Mon Sep 18 13:59:39 EDT 2017


Hi All,

Thank for the recent replies.  I want to use the subprocess.run module b/c per the docs os.system is antiquated and cannot use  more than 1 arg in 3.6.
Why am I doing wrong below?  Also couldn't I just copy and paste the subprocess code from github and create a file, but then how do I tell python this is a new module called os.system since this py file requires os.system and os.spawn*
I am on AIX 7.1, python 3.6.2, pip 9.0.1

Thx agn!

# pip install git+https://github.com/python/cpython/blob/3.6/Lib/subprocess.py -vvv
Collecting git+https://github.com/python/cpython/blob/3.6/Lib/subprocess.py
  Cloning https://github.com/python/cpython/blob/3.6/Lib/subprocess.py to /tmp/pip-bw8rryo9-build
  Running command git clone -q https://github.com/python/cpython/blob/3.6/Lib/subprocess.py /tmp/pip-bw8rryo9-build
remote: Not Found
fatal: repository 'https://github.com/python/cpython/blob/3.6/Lib/subprocess.py/' not found
Cleaning up...
Command "git clone -q https://github.com/python/cpython/blob/3.6/Lib/subprocess.py /tmp/pip-bw8rryo9-build" failed with error code 128 in None
Exception information:
Traceback (most recent call last):
  File "/opt/freeware/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/opt/freeware/lib/python3.6/site-packages/pip/commands/install.py", line 335, in run
    wb.build(autobuilding=True)
  File "/opt/freeware/lib/python3.6/site-packages/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "/opt/freeware/lib/python3.6/site-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/opt/freeware/lib/python3.6/site-packages/pip/req/req_set.py", line 620, in _prepare_file
    session=self.session, hashes=hashes)
  File "/opt/freeware/lib/python3.6/site-packages/pip/download.py", line 805, in unpack_url
    unpack_vcs_link(link, location)
  File "/opt/freeware/lib/python3.6/site-packages/pip/download.py", line 479, in unpack_vcs_link
    vcs_backend.unpack(location)
  File "/opt/freeware/lib/python3.6/site-packages/pip/vcs/__init__.py", line 286, in unpack
    self.obtain(location)
  File "/opt/freeware/lib/python3.6/site-packages/pip/vcs/git.py", line 142, in obtain
    self.run_command(['clone', '-q', url, dest])
  File "/opt/freeware/lib/python3.6/site-packages/pip/vcs/__init__.py", line 325, in run_command
    spinner)
  File "/opt/freeware/lib/python3.6/site-packages/pip/utils/__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "git clone -q https://github.com/python/cpython/blob/3.6/Lib/subprocess.py /tmp/pip-bw8rryo9-build" failed with error code 128 in None



Derek Smith  |  Unix/TSM Administrator  | Racksquared Data Centers
::  dereksmith at racksquared.com  *: www.racksquared.com<http://www.racksquared.com/> |  www.racksquared.jobs<http://www.racksquared.jobs/>

[cid:image003.png at 01D2E9AA.1B9CF8F0]



More information about the Tutor mailing list