ModuleNotFoundError:没有名为“numpy.distutils”的模块

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

安装

wrf-python
库时发生错误。

error: subprocess-exited-with-error
  
  python setup.py egg_info did not run successfully.
  exit code: 1
  
  [6 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\HP\AppData\Local\Temp\pip-install-oyk6_k1z\wrf-python_4d4fb187dd8b475c900ed0c20f1b8158\setup.py", line 17, in <module>
      import numpy.distutils.core
  ModuleNotFoundError: No module named 'numpy.distutils'
  [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.
------------------------------

我正在尝试安装 wrf-python 和 gdal 软件包。安装软件包时发生错误。

python pip failed-installation
1个回答
-1
投票

您正在使用 python 3.12,因为

numpy.distutils
已在
python 3.12
中删除。

您可以单独安装

python 3.11
python 3.10
并运行

pip install wrf-python

enter image description here

wrf-python最新版本发布:

发布:2022 年 5 月 26 日

https://pypi.org/project/wrf-python/

numpy.distutils

numpy.distutils 已在 NumPy 1.23.0 中弃用。 Python 3.12 中它将被删除;对于 Python <= 3.11 it will not be removed until 2 years after the Python 3.12 release

https://numpy.org/doc/stable/reference/distutils_status_migration.html#status-of-numpy-distutils-and-migration-advice

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