首页 > 其他分享 >ERROR: Failed cleaning build dir for numpy Failed > to build numpy ERROR

ERROR: Failed cleaning build dir for numpy Failed > to build numpy ERROR

时间:2024-11-01 21:20:25浏览次数:6  
标签:setup py Failed build ERROR pip numpy

文章目录

问题

(d2l) PS D:\project\test_st> pip install numpy==1.16.2
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple

Collecting numpy==1.16.2 Downloading
https://pypi.tuna.tsinghua.edu.cn/packages/cf/8d/6345b4f32b37945fedc1e027e83970005fc9c699068d2f566b82826515f2/numpy-1.16.2.zip
(5.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.1/5.1 MB 6.0 MB/s eta 0:00:00 Preparing metadata (setup.py) … done Building wheels for
collected packages: numpy Building wheel for numpy (setup.py) …
error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit
code: 1 ╰─> [17 lines of output]
Running from numpy source directory.
C:\Users\admin\AppData\Local\Temp\pip-install-0pyo81at\numpy_a8c97502239c47d7b6aa2749a831007d\numpy\distutils\misc_util.py:476:
SyntaxWarning: “is” with a literal. Did you mean “==”?
return is_string(s) and (‘*’ in s or ‘?’ is s)
Traceback (most recent call last):
File “”, line 2, in
File “”, line 34, in
File “C:\Users\admin\AppData\Local\Temp\pip-install-0pyo81at\numpy_a8c97502239c47d7b6aa2749a831007d\setup.py”,
line 415, in
setup_package()
File “C:\Users\admin\AppData\Local\Temp\pip-install-0pyo81at\numpy_a8c97502239c47d7b6aa2749a831007d\setup.py”,
line 394, in setup_package
from numpy.distutils.core import setup
File “C:\Users\admin\AppData\Local\Temp\pip-install-0pyo81at\numpy_a8c97502239c47d7b6aa2749a831007d\numpy\distutils\core.py”,
line 26, in
from numpy.distutils.command import config, config_compiler,
File “C:\Users\admin\AppData\Local\Temp\pip-install-0pyo81at\numpy_a8c97502239c47d7b6aa2749a831007d\numpy\distutils\command\config.py”,
line 19, in
from numpy.distutils.mingw32ccompiler import generate_manifest
File “C:\Users\admin\AppData\Local\Temp\pip-install-0pyo81at\numpy_a8c97502239c47d7b6aa2749a831007d\numpy\distutils\mingw32ccompiler.py”,
line 34, in
from distutils.msvccompiler import get_build_version as get_build_msvc_version
ModuleNotFoundError: No module named ‘distutils.msvccompiler’
[end of output]

note: This error originates from a subprocess, and is likely not a
problem with pip. ERROR: Failed building wheel for numpy Running
setup.py clean for numpy error: subprocess-exited-with-error

× python setup.py clean did not run successfully. │ exit code: 1
╰─> [10 lines of output]
Running from numpy source directory.

  `setup.py clean` is not supported, use one of the following instead:
    - `git clean -xdf` (cleans all files)
    - `git clean -Xdf` (cleans all versioned files, doesn't touch
                        files that aren't checked into the git repo)
 
  Add `--force` to your command to use it anyway if you must (unsupported).
 
  [end of output]

note: This error originates from a subprocess, and is likely not a
problem with pip. ERROR: Failed cleaning build dir for numpy Failed
to build numpy ERROR: ERROR: Failed to build installable wheels for
some pyproject.toml based projects (numpy) (d2l) PS
D:\project\test_st> pip install numpy1.16.2 Looking in indexes:
https://pypi.tuna.tsinghua.edu.cn/simple Collecting numpy
1.16.2
Using cached
https://pypi.tuna.tsinghua.edu.cn/packages/cf/8d/6345b4f32b37945fedc1e027e83970005fc9c699068d2f566b82826515f2/numpy-1.16.2.zip
(5.1 MB) Preparing metadata (setup.py) … done Building wheels for
collected packages: numpy Building wheel for numpy (setup.py) …
error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit
code: 1 ╰─> [17 lines of output]
Running from numpy source directory.
C:\Users\admin\AppData\Local\Temp\pip-install-as22iokr\numpy_ee62379734464183a9bae051cca214d8\numpy\distutils\misc_util.py:476:
SyntaxWarning: “is” with a literal. Did you mean “==”?
return is_string(s) and (‘*’ in s or ‘?’ is s)
Traceback (most recent call last):
File “”, line 2, in
File “”, line 34, in
File “C:\Users\admin\AppData\Local\Temp\pip-install-as22iokr\numpy_ee62379734464183a9bae051cca214d8\setup.py”,
line 415, in
setup_package()

    - `git clean -xdf` (cleans all files)
    - `git clean -Xdf` (cleans all versioned files, doesn't touch
                        files that aren't checked into the git repo)

  Add `--force` to your command to use it anyway if you must (unsupported).

  [end of output]

note: This error originates from a subprocess, and is likely not a
problem with pip. ERROR: Failed cleaning build dir for numpy Failed
to build numpy ERROR: ERROR: Failed to build installable wheels for
some pyproject.toml based projects (numpy)

解决方法

匹配pythonnumpy的版本

当降低numpy<1.16.3版本,但需要注意你的python版本为2.73.5-3.7

# python = 3.7
conda create -n name python=3.7
pip install numpy==1.16.2

Numpy官网:https://numpy.org/doc/stable/reference/generated/numpy.load.html
在这里插入图片描述

错误原因:python和numpy版本不兼容

查看我python的版本和numpy的版本
在这里插入图片描述
numpy=1.16.1和1.16.2,与我环境中的python=3.9不兼容,会出现以下错误:

ModuleNotFoundError: No module named ‘distutils.msvccompiler’
[end of output]

    - `git clean -xdf` (cleans all files)
    - `git clean -Xdf` (cleans all versioned files, doesn't touch
                        files that aren't checked into the git repo)

  Add `--force` to your command to use it anyway if you must (unsupported).

  [end of output]

note: This error originates from a subprocess, and is likely not a
problem with pip. ERROR: Failed cleaning build dir for numpy Failed
to build numpy ERROR: ERROR: Failed to build installable wheels for
some pyproject.toml based projects (numpy)

会出现下面的提醒与报错:
在这里插入图片描述
在这里插入图片描述

标签:setup,py,Failed,build,ERROR,pip,numpy
From: https://blog.csdn.net/qq_38473254/article/details/143403732

相关文章

  • SketchUp Pro 套件中的 Style Builder 有什么作用
    SketchUpPro套件中的StyleBuilder提供用户个性化样式创建工具,能自定义线条样式以制造独特的呈现效果,增强图示个性,支持载入手绘线条,赋予设计作品更有温度的觉感。StyleBuilder是SketchUpPro的一部分,允许用户轻松设计和创建自己的笔触样式,让模型呈现出手绘效果。使用这一工具,你......
  • SpringBoot:Failed to obtain JDBC Connection解决方案
    在第一次给自己的SpringBoot链接mysql的时候会出现很多问题可能的问题和解决方案本地的mysql没办法用root登陆这个一般是因为mysql在初始的时候默认root角色不能用密码登陆的原因可以用sudomysql先用最高权限进入mysql然后查看一下root的信息SELECTUser,Host,pl......
  • 0-petalinux 问题记录-VFS: Cannot open root device fs or unknown-block(0,0): erro
    0-petalinux问题记录-VFS:Cannotopenrootdevicefsorunknown-block(0,0):error-6这个问题是对SD卡分区之后,ext4分区写入一个文件系统之后的现象,不能正常启动,通过log可以看出来是能找到sd卡的分区,提示需要增加引导,可是在镜像构建的时候UBoot那里面已经设置过了,参数没......
  • 0-petalinux 问题记录-VFS: Cannot open root device fs or unknown-block(0,0): erro
    0-petalinux问题记录-VFS:Cannotopenrootdevicefsorunknown-block(0,0):error-6这个问题是对SD卡分区之后,ext4分区写入一个文件系统之后的现象,不能正常启动,通过log可以看出来是能找到sd卡的分区,提示需要增加引导,可是在镜像构建的时候UBoot那里面已经设置过了,参数没......
  • C语言用GNU源码编译建构系统工具(GNU BUILD SYSTEM)编译创建动态库
    C语言用GNU源码编译建构系统工具(GNUBUILDSYSTEM)编译创建动态库首先看一下这篇博文:C语言数据结构之顺序结构(Sequence)此次目的是将sequence.c改造一下,创建为一个动态链接库同时打包一个可发布的源码包,包括源码、头文件、测试文件!创建工作目录工作目录libmg(mg即muggles,一......
  • Dedecms后台 Fatal error:Allowed memory size of 8388608 bytes 提示的解决方法
    修改 .htaccess 文件在 .htaccess 文件的最上面添加:php_valuemax_execution_time1200php_valuememory_limit200Mphp_valuepost_max_size200Mphp_valueupload_max_filesize200M修改 php.ini 文件将 memory_limit 的值从 8M 改为 12M 或更......
  • Linux操作系统网站提示“Internal Server Error”报错
    可能原因及解决方法服务器资源超载解决方法:检查服务器资源使用情况,如CPU、内存和磁盘空间。如果资源使用率过高,考虑优化应用或升级服务器配置。PHP版本过低解决方法:检查当前PHP版本,并确保与WordPress兼容。可以通过以下命令查看PHP版本:   PHP文件配置错......
  • yarn安装报错 Unrecognized option: --version Error: Could not create the Java Vir
    在自己电脑上安装yarn报错,Unrecognizedoption:--versionError:CouldnotcreatetheJavaVirtualMachine.Error:Afatalexceptionhasoccurred.Programwillexit.估计是和之前安装的hadoop冲突了使用whereyarn命令,找到安装yarn的目录C:\ProgramFiles\nodejs把......
  • String、StringBuffer和StringBuilder的区别
    String、StringBuffer和StringBuilder的区别  下面从可变性、是否线程安全等方面来对String、StringBuffer、StringBuilder进行比较。  一、可变性  1.String  String类中使用final关键字修饰字符数组来保存字符串。publicfinalclassStringimplementsja......
  • Authentication token manipulation error
    #添加密码echo"dolphinscheduler"|passwd--stdindolphinscheduler创建用户后,给dolphinscheduler添加密码时,出现错误Authenticationtokenmanipulationerror 原因分析>>>>>>>>>[root@dev2-bu----1~]#lsattr/etc/passwd/etc/shadow-----......