安装Python库:landsat-util

问题描述 投票:0回答:1

请我尝试安装一个 python 库“landsat-util”,但它不起作用,可能是什么问题...请在运行命令时弹出的错误消息下面找到

$ pip install landsat-util
Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [13 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\sam\AppData\Local\Temp\pip-install-9r91dih_\scipy_45002029040641afb2d0203fcdf531ec\setup.py", line 265, in <module>
          setup_package()
        File "C:\Users\sam\AppData\Local\Temp\pip-install-9r91dih_\scipy_45002029040641afb2d0203fcdf531ec\setup.py", line 193, in setup_package
          write_version_py()
        File "C:\Users\sam\AppData\Local\Temp\pip-install-9r91dih_\scipy_45002029040641afb2d0203fcdf531ec\setup.py", line 136, in write_version_py
          FULLVERSION, GIT_REVISION = get_version_info()
                                      ^^^^^^^^^^^^^^^^^^
        File "C:\Users\sam\AppData\Local\Temp\pip-install-9r91dih_\scipy_45002029040641afb2d0203fcdf531ec\setup.py", line 112, in get_version_info
          import imp
      ModuleNotFoundError: No module named 'imp'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

我尝试通过一次运行以下代码来更新 Pip 和 Setuptools

python -m pip install --upgrade pip setuptools
python -m pip install --upgrade --force-reinstall --no-cache-dir numpy

之后我退出了

pip install landsat-util
,但是错误仍然存在

python image-processing landsat
1个回答
0
投票

如果您使用 python 3.12,imp 模块存在一些错误,您可以在此处阅读,他们在此线程中提出了解决方案https://bugs.launchpad.net/ubuntu/+source/passenger/+bug/2049942

© www.soinside.com 2019 - 2024. All rights reserved.