I experience this behaviour with 3 modules (sabctools
, sabyenc3
, brotli
) - all installed from PyPI, and all have manylinux2014
in their filename. I’ll concentrate on a single module for support-purposes.
Environment is a QNAP NAS running QTS (QNAP’s heavily-modified version of Ubuntu). Python 3.10.7 is installed via Entware.
First, created a new virtualenv
:
[/share/Public] # python3 -m virtualenv venv
created virtual environment CPython3.10.7.final.0-64 in 2527ms
creator CPython3Posix(dest=/share/CACHEDEV2_DATA/Public/venv, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/share/CACHEDEV2_DATA/Public/pip-cache)
added seed packages: pip==23.0, setuptools==67.1.0, wheel==0.38.4
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
[/share/Public] # . venv/bin/activate
(venv) [/share/Public] # pip list
Package Version
---------- -------
pip 23.0
setuptools 67.1.0
wheel 0.38.4
Then, I installed the new sabctools
module via pip
:
(venv) [/share/Public] # pip install sabctools
Collecting sabctools
Downloading sabctools-6.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (174 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 174.2/174.2 kB 1.5 MB/s eta 0:00:00
Installing collected packages: sabctools
Successfully installed sabctools-6.1.1
Then test. I’m unable to import it. Python can’t see this module, although it IS listed as installed by pip
.
(venv) [/share/Public] # python
Python 3.10.7 (main, Dec 4 2022, 09:29:05) [GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sabctools
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/share/CACHEDEV2_DATA/Public/venv/lib/python3.10/site-packages/sabctools/__init__.py", line 2, in <module>
from sabctools.sabctools import *
ModuleNotFoundError: No module named 'sabctools.sabctools'
If I then perform a --force-reinstall
via pip (which appears to run some sort of local compiling process), I can then import this module without issue.
(venv) [/share/Public] # pip install --force-reinstall --no-binary :all: sabctools
DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at https://github.com/pypa/pip/issues/11453
Collecting sabctools
Downloading sabctools-6.1.1.tar.gz (228 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 228.7/228.7 kB 1.8 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: sabctools
Building wheel for sabctools (pyproject.toml) ... done
Created wheel for sabctools: filename=sabctools-6.1.1-cp310-cp310-linux_aarch64.whl size=35493 sha256=d9d6be1d4c906b348e16486c9b995ecb647603e658eb1a5fcc94ab8d4ea2ab25
Stored in directory: /share/CACHEDEV2_DATA/Public/pip-cache/wheels/af/7e/24/6987efea469e00564a548e783b96a246c97b391c7837ce7fe8
Successfully built sabctools
Installing collected packages: sabctools
Attempting uninstall: sabctools
Found existing installation: sabctools 6.1.1
Uninstalling sabctools-6.1.1:
Successfully uninstalled sabctools-6.1.1
Successfully installed sabctools-6.1.1
(venv) [/share/Public] # python
Python 3.10.7 (main, Dec 4 2022, 09:29:05) [GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sabctools
>>> import sys
>>> for path in sys.path: print(path);
...
/opt/lib/python310.zip
/opt/lib/python3.10
/opt/lib/python3.10/lib-dynload
/share/CACHEDEV2_DATA/Public/venv/lib/python3.10/site-packages
>>>
Hoping someone can please advise me further. Thank you.