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

Closed
XerTheSquirrel opened this issue Jul 13, 2018 · 3 comments
Closed

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

XerTheSquirrel opened this issue Jul 13, 2018 · 3 comments
Labels

Comments

@XerTheSquirrel
Copy link

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

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
Author

Also the Python example in requirements.txt is using a very old version of IOpipe, version 0.6.1.

@kolanos
Copy link
Contributor

kolanos commented Jul 13, 2018

@XerTheSquirrel Can this be moved to https://github.com/iopipe/examples? That appears to be where the bug is located and where the fix will happen. Also, in your traceback, it looks like it's using Python 2.7. Do you have a pip3 as well?

@XerTheSquirrel
Copy link
Author

Okay I have moved it to iopipe/examples#22 . Will close this one, sorry!

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

2 participants