Skip to content

Python Example information not working on Debian/Ubuntu. #22

Description

@XerTheSquirrel

Description

Building of the example archive package does not work because Debian/Ubuntu has different behavior for Python.

Steps to reproduce the issue:

  1. Install python-pip on Debian (stable or testing as of this writing).
  2. git clone https://github.com/iopipe/examples/
  3. cd examples
  4. cd python
  5. python3 archive.py

Describe the results you received:

An invalid archive.zip with the given error trace:

stephanie@oaktree:~/iopipe/iopipe-examples/python$ python3 archive.py
Installing dependencies into libs directory...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 360, in run
    prefix=options.prefix_path,
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 247, in move_wheel_files
    prefix=prefix,
  File "/usr/lib/python2.7/dist-packages/pip/locations.py", line 153, in distutils_scheme
    i.finalize_options()
  File "/usr/lib/python2.7/distutils/command/install.py", line 289, in finalize_options
    raise DistutilsOptionError("can't combine user with prefix, "
DistutilsOptionError: can't combine user with prefix, exec_prefix/home, or install_(plat)base
Generating archive.zip...

@kolanos
From: iopipe/iopipe-python#248

Describe the results you expected:

Getting archive.zip that is valid and no nasty error messages.

Additional information you deem important (e.g. issue happens only occasionally):

Adding --system before -t makes the build a success using the archive.py script.

subprocess.call([PIP, 'install', '-r', 'requirements.txt', '--system', '-t', 'libs'], stdout=subprocess.PIPE)

See:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions