Closed Jayjader closed 4 years ago
I reproduce the bug on Debian testing (error when installing orderedset
only, fixed by installing cython
before installing orderedset
).
Versions used:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux bullseye/sid
Release: testing
Codename: bullseye
$ uname -a
Linux foehn 5.4.0-4-amd64 #1 SMP Debian 5.4.19-1 (2020-02-13) x86_64 GNU/Linux
$ ./venv/bin/python --version
Python 3.7.6
$ ./venv/bin/pip --version
pip 20.0.2 from /tmp/xxx/venv/lib/python3.7/site-packages/pip (python 3.7)
I reproduced the bug when using the basic python:3.7 docker image (Debian GNU/Linux 10 (buster))
❯ docker run -it python:3.7 bash
root@e4465e1c01e0:/# pip install orderedset
Thanks, was sure I had regenerated the C file, but apparently not. 2.0.3 out.
Attempting to install
orderedset
via pip in python3.7 and 3.8 fails with error containing messageerror: command 'gcc' failed with exit status 1
.Steps to reproduce (lines prefixed by
$
contain the commands):A quick search online yields these similar issues in other projects: 1 2, and in particular this comment seems to contain a possible fix.
The root idea appears to be that the cached C source files generated by Cython were not regenerated for release 2.0.2's enabling of use with python3.7 & 3.8, and thus contain symbols present in python3.6 but removed in 3.7 onwards. These cached files furthermore seem to be used when Cython is absent from the virtualenv. If Cython is already present, the C source files are generated on the spot, and seem to be compatible with the python version present (3.7 and 3.8).
Output in my terminal:
The apparent quick fix is to regenerate and republish the C source files to pypi.
Additionally, the comment I linked above mentions adding
cython
to thesetup_requires
argument tosetup
(sourcing this stackoverflow answer). However, I am unsure if this will work given discussion on other issues found on github, notably this comment.For completeness's sake, installing with python3.8 fails with the same behavior, whereas using python3.6 succeeds.
Personal environment:
5.5.5-arch1-1
3.7.6