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

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

Open
XerTheSquirrel opened this issue Jul 13, 2018 · 1 comment
Open

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

XerTheSquirrel opened this issue Jul 13, 2018 · 1 comment
Labels

Comments

@XerTheSquirrel
Copy link
Contributor

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:

@XerTheSquirrel
Copy link
Contributor Author

Replying to iopipe/iopipe-python#248 (comment):

I do not have pip3 at all, but I am installing it right now.

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

No branches or pull requests

1 participant