Open richboss opened 4 years ago
Hello there, thank you for reporting and suggesting the fixes. From pip's standpoint, I'm siding with
For example by creating a ProcessPool or instantiating a SemLock. Checking for import failures only is not enough.
Although it's not perfect, pip already has quite many options.
On the other hand, it seems that the CPython binary you're using is not properly built. IIUC, if sem_open
is not implemented on the platform, CPython should be compiled without HAVE_SEM_OPEN.
On the other hand, it seems that the CPython binary you're using is not properly built. IIUC, if
sem_open
is not implemented on the platform, CPython should be compiled [without HAVE_SEM_OPEN]
I believe you are right. The package seems to be compiled with HAVE_SEM_OPEN=1 (see below), but the implementation is missing.
Python 3.8.6 (default, Sep 25 2020, 09:36:53)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import _multiprocessing as mp
>>> mp.flags
{'HAVE_SEM_OPEN': 1, 'HAVE_SEM_TIMEDWAIT': 1}
I believe the following might be the package that is at fault (dpkg -l libpython3.8-stdlib
):
||/ Name Version Architektur Beschreibung
+++-=========================-============-============-===============================================================================
ii libpython3.8-stdlib:armhf 3.8.6-1 armhf Interactive high-level object-oriented language (standard library, version 3.8)
I'll try to file a bug report at bugs.debian.org. But I am unsure if this will amount to anything. Alas, my attempts at finding a solution on my own were not successful. As a workaround for the time being I wrote a simple patch script for local use which I will run each time when pip gets updated.
It seems that the issue is with how their Python binaries for ARM are compiled, so I'd also suggest filing a report with Debian. Please do link to the report from here, if and when you file it. :)
Please do link to the report from here, if and when you file it. :)
This is not the same issue as #8161
Environment
Debian Chroot installed on a Synology DS214 NAS
Description
pip list --outdated
fails, printing a stacktrace as follows:Analysis On this system,
multiprocessing.synchronize
appears to be available (but it is not working). The check in file_internal/utils/parallel.py
detects no problem since the statementimport multiprocessing.synchronize
does not fail. Hence multiprocessing or multithreading will be used in pip. But the necessessary functions are not implemented! Therefore an OSError is raised, as shown.Proposed solution An additional check should detect if multiprocessing is really working. For example by creating a ProcessPool or instantiating a SemLock. Checking for import failures only is not enough. This doesn't help at all if an error is only raised when an object is instantiated.
An alternative would be adding a configuration option to disable the use of multiprocessing, even if it seems available.