question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Install failure with pip 20 and setuptools 46

See original GitHub issue

Hi, sorry to intrude, but there may be some issues regarding recent evolution made by the pypa and the choice of poetry as the “packaging backend” (no offense). Information may be worth something on your side of other users of this package, don’t know.

In an environment with pip==18.1, setuptools==40.8.0, gcc and some other libs, pip install streaming-form-data works without any issue, everything’s fine. Well, you gotta have more than just pip and setuptools, but that happens.

In an environment with pip==20.1.1 (and higher) and setuptools==46.4.0, even with the gcc and libs, I got the following

root@cdb4ae3c174c:/app# pip install streaming-form-data
Collecting streaming-form-data
  Downloading streaming-form-data-1.7.0.tar.gz (92 kB)
     |████████████████████████████████| 92 kB 1.1 MB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: streaming-form-data
  Building wheel for streaming-form-data (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmp5lcaherm
       cwd: /tmp/pip-install-zbvymr76/streaming-form-data
  Complete output (25 lines):
  A setup.py file already exists. Using it.
  Traceback (most recent call last):
    File "/tmp/pip-install-zbvymr76/streaming-form-data/setup.py", line 2, in <module>
      from setuptools import setup
  ModuleNotFoundError: No module named 'setuptools'
[...]
 ERROR: Failed building wheel for streaming-form-data
Failed to build streaming-form-data
ERROR: Could not build wheels for streaming-form-data which use PEP 517 and cannot be installed directly

At first I didn’t paid too much attention, thought it was about the wheel and the pep 517, and tried things like --no-binary :all: and --no-binary streaming-form-data, also switching the use of PEP 517, to no avail alas. Before realizing it was not the wheel itself, but the direct install too.

Long story short, if you dig around the pypa discussions on github and so forth, it seems there is some issue with some packaging (especially PEP 517/poetry linked) and finding packages in build environments. Hence the “no setuptools found” issue at the beginning of the stacktrace. Plus there is quite some instability/uncertainty in the current state of Python packaging (once again, cf. pypa and recent evolution).

So for now my solution is

pip install poetry
pip --no-build-isolation streaming-form-data

But that’s not so satisfying. Is there something that could be done streaming-form-data side ? I don’t think so but it’s worth a shot. Maybe there other way to configure pip so as to not have this issue (maybe something else than no binary or pep 517 related elements).

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
siddhantgoelcommented, Oct 5, 2020

Alright, I just uploaded 1.7.1 and this version seems to install fine with a plain pip install streaming-form-data.

Ended up replacing the poetry build backend with a setup.py file and had to drop support for Python 3.5. 🤷‍♂️

1reaction
siddhantgoelcommented, Oct 6, 2020

I’m still using poetry on other pure-python projects, so it’s not all that bad. 🙂 Thanks for the heads up about the README.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pip install error when old setuptools versions used #79 - GitHub
I tried installing back to setuptools v1.0, and pip install absl 0.6 still worked. I found some posts that have some other ways...
Read more >
Pip install error. Setuptools.command not found - Stack Overflow
Try installing: sudo apt-get install python-setuptools. if this doesn't work try: curl -O https://bootstrap.pypa.io/get-pip.py python ...
Read more >
Build "can not execute setup.py since setuptools is not available"
Hi Dan, It appears that there may be some version incompatibilities with setuptools. I'm not super familiar with how Python package management works,...
Read more >
setuptools 4.0 - PyPI
Easily download, build, install, upgrade, and uninstall Python packages. ... Issue #184: Correct failure where find_package over-matched packages when ...
Read more >
History - setuptools 65.6.3.post20221220 documentation
Project can no longer be installed from source on pip 19.x, but install from source is still supported on pip < 19 and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found