导入 kneed 包时出错

导入 kneed 包时出错

我在 linux aarch64 架构中安装了 kneed 包。当我在 python 中导入 kneed 时,出现以下错误

 import kneed
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/su/miniconda3/envs/myenv/lib/python3.10/site-packages/kneed/__init__.py", line 4, in <module>
    from .knee_locator import KneeLocator
  File "/home/su/miniconda3/envs/myenv/lib/python3.10/site-packages/kneed/knee_locator.py", line 3, in <module>
    from scipy.signal import argrelextrema
  File "/home/su/miniconda3/envs/myenv/lib/python3.10/site-packages/scipy/signal/__init__.py", line 309, in <module>
    from . import _sigtools, windows
  File "/home/su/miniconda3/envs/myenv/lib/python3.10/site-packages/scipy/signal/windows/__init__.py", line 41, in <module>
    from ._windows import *
  File "/home/su/miniconda3/envs/myenv/lib/python3.10/site-packages/scipy/signal/windows/_windows.py", line 7, in <module>
    from scipy import linalg, special, fft as sp_fft
  File "/home/su/miniconda3/envs/myenv/lib/python3.10/site-packages/scipy/__init__.py", line 211, in __getattr__
    return _importlib.import_module(f'scipy.{name}')
  File "/home/su/miniconda3/envs/myenv/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/su/miniconda3/envs/myenv/lib/python3.10/site-packages/scipy/fft/__init__.py", line 92, in <module>
    from ._helper import next_fast_len
  File "/home/su/miniconda3/envs/myenv/lib/python3.10/site-packages/scipy/fft/_helper.py", line 3, in <module>
    from ._pocketfft import helper as _helper
  File "/home/su/miniconda3/envs/myenv/lib/python3.10/site-packages/scipy/fft/_pocketfft/__init__.py", line 3, in <module>
    from .basic import *
  File "/home/su/miniconda3/envs/myenv/lib/python3.10/site-packages/scipy/fft/_pocketfft/basic.py", line 6, in <module>
    from . import pypocketfft as pfft
ImportError: /usr/lib/aarch64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /home/su/miniconda3/envs/myenv/lib/python3.10/site-packages/scipy/fft/_pocketfft/pypocketfft.cpython-310-aarch64-linux-gnu.so)

当我检查 libstdc++.so.6 时,

ls /usr/lib/aarch64-linux-gnu | grep libstdc++.so.6
libstdc++.so.6
libstdc++.so.6.0.28

我可以知道我是否知道安装任何包来解决这个问题导入错误

以下是我安装的软件包

Package                      Version
---------------------------- ------------
absl-py                      1.2.0
appdirs                      1.4.4
astunparse                   1.6.3
attrs                        22.1.0
audioread                    2.1.9
cachetools                   5.2.0
certifi                      2022.6.15
cffi                         1.15.1
charset-normalizer           2.1.0
cycler                       0.11.0
decorator                    5.1.1
distlib                      0.3.5
docopt                       0.6.2
filelock                     3.8.0
flatbuffers                  2.0
fonttools                    4.34.4
fpdf                         1.7.2
gast                         0.4.0
google-auth                  2.10.0
google-auth-oauthlib         0.4.6
google-pasta                 0.2.0
grpcio                       1.47.0
h5py                         3.7.0
hdfs                         2.7.0
idna                         3.3
joblib                       1.1.0
jsonschema                   4.9.1
keras                        2.9.0
Keras-Preprocessing          1.1.2
kiwisolver                   1.4.4
kneed                        0.8.1
libclang                     14.0.6
librosa                      0.9.2
llvmlite                     0.39.0
logger                       1.4
Markdown                     3.4.1
MarkupSafe                   2.1.1
matplotlib                   3.5.2
numba                        0.56.0
numpy                        1.22.0
oauthlib                     3.2.0
opt-einsum                   3.3.0
packaging                    21.3
pandas                       1.4.3
Pillow                       9.2.0
pip                          22.2.2
platformdirs                 2.5.2
pooch                        1.6.0
protobuf                     3.19.4
pyasn1                       0.4.8
pyasn1-modules               0.2.8
pycparser                    2.21
pyparsing                    3.0.9
pyrsistent                   0.18.1
python-dateutil              2.8.2
python-Levenshtein           0.12.2
pytz                         2022.1
PyYAML                       6.0
rdp                          0.8
requests                     2.28.1
requests-oauthlib            1.3.1
resampy                      0.4.0
rsa                          4.9
scikit-learn                 1.1.2
scipy                        1.9.0
seaborn                      0.11.2
setuptools                   63.4.3
six                          1.16.0
SoundFile                    0.10.3.post1
tensorboard                  2.9.1
tensorboard-data-server      0.6.1
tensorboard-plugin-wit       1.8.1
tensorflow                   2.10.0rc0
tensorflow-cpu-aws           2.10.0rc0
tensorflow-estimator         2.9.0
tensorflow-io-gcs-filesystem 0.26.0
termcolor                    1.1.0
threadpoolctl                3.1.0
typing_extensions            4.3.0
urllib3                      1.26.11
virtualenv                   20.16.3
watchdog                     2.1.9
Werkzeug                     2.2.2
wheel                        0.37.1
wrapt                        1.14.1

此外,软件包kears, kneed, librosa, seaborn, sklearn and tensorflow也给出了相同的错误。我不确定在哪里以及如何检查软件包版本的依赖关系。请问我如何知道哪些版本与 numpy 版本兼容?我应该kears, kneed, librosa, seaborn, sklearn, tensorflow and numpy使用 pip install 为这些软件包安装哪些版本。

相关内容