numpy 如何解决这个pip安装错误(当尝试安装mxnet)?

camsedfj  于 2023-05-07  发布在  其他
关注(0)|答案(1)|浏览(383)

我正在使用anaconda并运行cmd:pip instal mxnet。我已经尝试升级pip,wheel,setuptools。安装--no-use-pep517--no-cache-dir--pre(& A),如下所示:https://bobbyhadz.com/blog/python-eror-legacy-instal-failure已安装visualC++构建工具(& I)。仍然会出现以下情况:eror-legacy-install-failure

Collectin mxnet
    Using cached mxnet-1.7.0.post2-py2.py3-none-      win_amd64.whl(33.1MB)
  Collectin numpy<1.17.0,>=1.8.2
    Using cached numpy-1.16.6.zip (5.1MB)
    Preparingmetadata(setup.py)...done
  Req already satisfied:reqs<2.19.0,>=2.18.4 in       c:\path\anaconda3\lib\site-packages (from mxnet)(2.18.4)
  Collecting graphviz<0.9.0,>=0.8.1
    Using cached graphviz-0.8.4-py2.py3-none-any.whl(16kB)
  Requirement already satisfied:idna<2.7,>=2.5 in c:\path\anaconda3\lib\site-packages (from requests<2.19.0,>=2.18.4->mxnet)(2.6)
  Requirement already satisfied:certifi>=2017.4.17 in c:\path\anaconda3\lib\site-packages (from requests<2.19.0,>=2.18.4->mxnet)(2022.9.14)
  Requirement already satisfied:chardet<3.1.0,>=3.0.2 in c:\path\anaconda3\lib\site-packages (from requests<2.19.0,>=2.18.4->mxnet)(3.0.4)
  Requirement alredy satisfied:urllib3<1.23,>=1.21.1 in c:\path\anaconda3\lib\site-packages (from requests<2.19.0,>=2.18.4->mxnet)(1.22)
  Building wheels for collected packages:numpy
    Building wheel for numpy (setup.py)
    eror:subprocess-exited-with-eror

    × python setup.py bdist_wheel didnt run successfuly
    │ exitcode:1
    ╰─>[264lines of output]
  Runing from numpy source dir.
  C:\path\AppData\Local\Temp\pip-instal-tt_fysn_\numpy_4c416a770c4e4a078f07d959c6bf4a7c\numpy\distutils\misc_util.py:476:SyntaxWarning:"is" with a literal. Did u mean "=="?
    return is_string(s)& ('*'in s or'?'is s)
  blas_opt_info blas_mkl_info:
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs mkl_rt not found in['C:\\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
    NOT AVAILABLE 

  blis_info:
  No modle named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs blis not found in['C:\\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
    NOT AVAILBLE
  openblas_info:
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs openblas not found in['C:\\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
  get_default_fcompiler:matching types:'['gnu','intelv','absoft','compaqv','intelev','gnu95','g95','intelvem','intelem','flang']'
  customize GnuFCompiler
  couldnt locate executable g77,f77
  customize IntelVisualFCompiler
  couldnt locate executable ifort,executable ifl
  customize AbsoftFCompiler
  couldnt locate executable f90
  customize CompaqVisualFCompiler
  couldnt locate executable DF
  customize IntelItaniumVisualFCompiler
  couldnt locate executable efl
  customize Gnu95FCompiler
  couldnt locate executable gfortran,executable f95
  customize G95FCompiler
  couldnt locate executable g95
  customize IntelEM64VisualFCompiler,IntelEM64TFCompiler
  couldnt locate executable efort,executable efc
  customize PGroupFlangCompiler
  couldnt locate executable flang
  don't know how to compile Fortran code on platform 'nt'
    NOT AVAILABLE

  atlas_3_10_blas_threads_info:
  Setting PTATLAS=ATLAS
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs tatlas not found in['C:\\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
    NOT AVAILABLE

  atlas_3_10_blas_info:
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs satlas not found in['C:\\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
    NOT AVAILABLE

  atlas_blas_threads_info:
  Setting PTATLAS=ATLAS
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs ptf77blas,ptcblas,atlas not found in['C:\\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
    NOT AVAILABLE

  atlas_blas_info:
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs f77blas,cblas,atlas not found in['C:\\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
    NOT AVAILABLE

  accelerate_info:
    NOT AVAILABLE

  C:\path\AppData\Local\Temp\pip-instal-tt_fysn_\numpy_4c416a770c4e4a078f07d959c6bf4a7c\numpy\distutils\system_info.py:639:UserWarning:
      Atlas (http://math-atlas.sourceforge.net/)libs not found.
      dirs to search for the libs can be specified inthe
      numpy/distutils/site.cfg file (section[atlas])orby setting
      the ATLAS env var.
    self.calc_info()
  blas_info:
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs blas not found in['C:\\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
    NOT AVAILABLE

  C:\path\AppData\Local\Temp\pip-instal-tt_fysn_\numpy_4c416a770c4e4a078f07d959c6bf4a7c\numpy\distutils\system_info.py:639:UserWarning:
      Blas (http://www.netlib.org/blas/)libs not found.
      dirs to search for the libs can be specified inthe
      numpy/distutils/site.cfg file (section[blas])orby setting
      the BLAS env var.
    self.calc_info()
  blas_src_info:
    NOT AVAILABLE
  C:\path\AppData\Local\Temp\pip-instal-tt_fysn_\numpy_4c416a770c4e4a078f07d959c6bf4a7c\numpy\distutils\system_info.py:639:UserWarning:
      Blas (http://www.netlib.org/blas/)sources not found.
      Dirs to search for the sources can be specified inthe
      numpy/distutils/site.cfg file (section[blas_src])orby setting
      the BLAS_SRC env var
    self.calc_info()
    NOT AVAILBLE

  The cmd "svnversion" is either typed wrong orcant befind.
  non-existing path in 'numpy\\distutils':'site.cfg'
  lapack_opt_info:
  lapack_mkl_info:
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs mkl_rt not found in['C:\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
    NOT AVAILABLE

  openblas_lapack_info:
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs openblas not found in['C:\\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
    NOT AVAILABLE

  openblas_clapack_info:
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs openblas,lapack not found in['C:\\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
    NOT AVAILABLE

  atlas_3_10_threads_info:
  Setting PTATLAS=ATLAS
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\path\anaconda3\lib
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs tatlas,tatlas not found in C:\path\anaconda3\lib
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs tatlas,tatlas not found in C:\
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\path\anaconda3\libs
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs tatlas,tatlas not found in C:\path\anaconda3\libs
  <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
    NOT AVAILABLE

  atlas_3_10_info:
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\path\anaconda3\lib
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs satlas,satlas not found in C:\path\anaconda3\lib
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs satlas,satlas not found in C:\
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\path\anaconda3\libs
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs satlas,satlas not found in C:\path\anaconda3\libs
  <class 'numpy.distutils.system_info.atlas_3_10_info'>
    NOT AVAILABLE

  atlas_threads_info:
  Setting PTATLAS=ATLAS
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\path\anaconda3\lib
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs ptf77blas,ptcblas,atlas not found in C:\path\anaconda3\lib
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs ptf77blas,ptcblas,atlas not found in C:\
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\path\anaconda3\libs
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs ptf77blas,ptcblas,atlas not found in C:\path\anaconda3\libs
  <class 'numpy.distutils.system_info.atlas_threads_info'>
    NOT AVAILABLE

  atlas_info:
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\path\anaconda3\lib
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs f77blas,cblas,atlas not found in C:\path\anaconda3\lib
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs f77blas,cblas,atlas not found in C:\
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\path\anaconda3\libs
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs f77blas,cblas,atlas not found in C:\path\anaconda3\libs
  <class 'numpy.distutils.system_info.atlas_info'>
    NOT AVAILABLE

  lapack_info:
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack not found in['C:\\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
    NOT AVAILABLE

  C:\path\AppData\Local\Temp\pip-instal-tt_fysn_\numpy_4c416a770c4e4a078f07d959c6bf4a7c\numpy\distutils\system_info.py:639:UserWarning:
      Lapack (http://www.netlib.org/lapack/)libs not found.
      dirs to search for the libs can be specified inthe
      numpy/distutils/site.cfg file (section[lapack])orby setting
      the LAPACK env var.
    self.calc_info()
  lapack_src_info:
    NOT AVAILABLE

  C:\path\AppData\Local\Temp\pip-instal-tt_fysn_\numpy_4c416a770c4e4a078f07d959c6bf4a7c\numpy\distutils\system_info.py:639:UserWarning:
      Lapack (http://www.netlib.org/lapack/)sources not found.
      dirs to search for the sources can be specified inthe
      numpy/distutils/site.cfg file (section[lapack_src])orby setting
      the LAPACK_SRC env var.
    self.calc_info()
    NOT AVAILABLE

  C:\path\anaconda3\lib\site-packages\setuptools\_distutils\dist.py:265:UserWarning:Unknown distribution option:'define_macros'
    warnings.warn(msg)
  runing bdist_wheel
  runing build
  runing config_cc
  unifing config_cc,config,build_clib,build_ext,build comm&s --compiler options
  runing config_fc
  unifing config_fc,config,build_clib,build_ext,build comm&s --fcompiler options
  runing build_src
  build_src
  building py_modules sources
  creating build
  creating build\src.win-amd64-3.9
  creating build\src.win-amd64-3.9\numpy
  creating build\src.win-amd64-3.9\numpy\distutils
  building lib "npymath" sources
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  eror:Microsoft Visual C++ 14.0 or greater is required.Get it with "Microsoft C++ Build Tools":https://visualstudio.microsoft.com/visual-cpp-build-tools/
 [end of output]

注意:此错误源于子进程,可能不是pip的问题EROR:Failed building wheel for numpy runing setup.py clean for numpy eror:subprocess-exited-with-eror

× python setup.py clean did not run successfully.
  │ exit code:1
  ╰─>[10 lines of output]
  runing from numpy source dir.
  `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 ur comm& to use it anyway if u must (unsupported).
 [end of output]

note:This eror originates from a subprocess,& is likely not a problem with pip.

错误:无法清理numpy的构建目录无法构建numpy安装收集的软件包:numpy,graphviz,mxnet尝试卸载:numpy找到现有安装:numpy 1. 23. 5正在卸载numpy-1. 23. 5:已成功卸载numpy-1.23.5运行setup.py install for numpy...错误错误:子进程退出错误
×运行setup.py install for numpy未成功运行。│退出代码:1 ─〉[269行输出]从numpy源目录运行。

Note:if u need reliable uninstal behavior,then instalwith pip insted of usin `setup.py instal`:
    - `pip instal .`       (from a git repo or downloaded source release)
    - `pip instal numpy`   (last NumPy release on PyPi)
  blas_opt_info:
  blas_mkl_info:
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs mkl_rt not fond in['C:\\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
    NOT AVAILABLE
  blis_info:
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs blis not found in['C:\\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
    NOT AVAILABLE
  openblas_info:
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs openblas not found in['C:\\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
  get_default_fcompiler:matching types:'['gnu','intelv','absoft','compaqv','intelev','gnu95','g95','intelvem','intelem','flang']'
  customize GnuFCompiler
  couldnt locate executable g77,executable f77
  customize IntelVisualFCompiler
  couldnt locate executable ifort,ifl
  customize AbsoftFCompiler
  couldnt locate executable f90
  customize CompaqVisualFCompiler
  couldnt locate executable DF
  customize IntelItaniumVisualFCompiler
  couldnt locate executable efl
  customize Gnu95FCompiler
  couldnt locate executable gfortran,f95
  customize G95FCompiler
  couldnt locate executable g95
  customize IntelEM64VisualFCompiler,IntelEM64TFCompiler
  couldnt locate executable efort,efc
  customize PGroupFlangCompiler
  couldnt locate executable flang
  don't know how to compile Fortran code on platform 'nt'
    NOT AVAILABLE

  atlas_3_10_blas_threads_info:
  Setting PTATLAS=ATLAS
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs tatlas not found in['C:\\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
    NOT AVAILABLE

  atlas_3_10_blas_info:
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs satlas not found in['C:\\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
    NOT AVAILABLE

  atlas_blas_threads_info:
  Setting PTATLAS=ATLAS
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs ptf77blas,ptcblas,atlas not found in['C:\\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
    NOT AVAILABLE

  atlas_blas_info:
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs f77blas,cblas,atlas not found in['C:\\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
    NOT AVAILABLE

  accelerate_info:
    NOT AVAILABLE

  C:\path\AppData\Local\Temp\pip-instal-tt_fysn_\numpy_4c416a770c4e4a078f07d959c6bf4a7c\numpy\distutils\system_info.py:639:UserWarning:
      Atlas (http://math-atlas.sourceforge.net/)libs not found.
      dirs to search for the libs can be specified inthe
      numpy/distutils/site.cfg file (section[atlas])orby setting
      the ATLAS env var.
    self.calc_info()
  blas_info:
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs blas not found in['C:\\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
    NOT AVAILABLE

  C:\path\AppData\Local\Temp\pip-instal-tt_fysn_\numpy_4c416a770c4e4a078f07d959c6bf4a7c\numpy\distutils\system_info.py:639:UserWarning:
      Blas (http://www.netlib.org/blas/)libs not found.
      dirs to search for the libs can be specified inthe
      numpy/distutils/site.cfg file (section[blas])orby settin
      the BLAS envi. var.
    self.calc_info()
  blas_src_info:
    NOT AVAILABLE

  C:\path\AppData\Local\Temp\pip-instal-tt_fysn_\numpy_4c416a770c4e4a078f07d959c6bf4a7c\numpy\distutils\system_info.py:639:UserWarning:
      Blas (http://www.netlib.org/blas/)sources not found.
      dirs to search for the sources can be specified inthe
      numpy/distutils/site.cfg file (section[blas_src])orby setting
      the BLAS_SRC env var.
    self.calc_info()
    NOT AVAILABLE

  The cmd"svnversion" is eithertyped wrong orcant be find.
  non-existing path in 'numpy\\distutils':'site.cfg'
  lapack_opt_info:
  lapack_mkl_info:
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs mkl_rt not found in['C:\\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
    NOT AVAILABLE

  openblas_lapack_info:
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs openblas not found in['C:\\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
    NOT AVAILABLE

  openblas_clapack_info:
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs openblas,lapack not found in['C:\\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
    NOT AVAILABLE

  atlas_3_10_threads_info:
  Setting PTATLAS=ATLAS
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\path\anaconda3\lib
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs tatlas,tatlas not found in C:\path\anaconda3\lib
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs tatlas,tatlas not found in C:\
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\path\anaconda3\libs
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryig from distutils
  customize MSVCCompiler
    libs tatlas,tatlas not found in C:\path\anaconda3\libs
  <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
    NOT AVAILABLE

  atlas_3_10_info:
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\path\anaconda3\lib
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs satlas,satlas not found in C:\path\anaconda3\lib
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs satlas,satlas not found in C:\
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\path\anaconda3\libs
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs satlas,satlas not found in C:\path\anaconda3\libs
  <class 'numpy.distutils.system_info.atlas_3_10_info'>
    NOT AVAILABLE

  atlas_threads_info:
  Setting PTATLAS=ATLAS
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\path\anaconda3\lib
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs ptf77blas,ptcblas,atlas not found in C:\path\anaconda3\lib
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs ptf77blas,ptcblas,atlas not found in C:\
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\path\anaconda3\libs
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs ptf77blas,ptcblas,atlas not found in C:\path\anaconda3\libs
  <class 'numpy.distutils.system_info.atlas_threads_info'>
    NOT AVAILABLE

  atlas_info:
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\path\anaconda3\lib
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs f77blas,cblas,atlas not found in C:\path\anaconda3\lib
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs f77blas,cblas,atlas not found in C:\
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack_atlas not found in C:\path\anaconda3\libs
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs f77blas,cblas,atlas not found in C:\path\anaconda3\libs
  <class 'numpy.distutils.system_info.atlas_info'>
    NOT AVAILABLE

  lapack_info:
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  customize MSVCCompiler
    libs lapack not found in['C:\\path\\anaconda3\\lib','C:\\','C:\\path\\anaconda3\\libs']
    NOT AVAILABLE

  C:\path\AppData\Local\Temp\pip-instal-tt_fysn_\numpy_4c416a770c4e4a078f07d959c6bf4a7c\numpy\distutils\system_info.py:639:UserWarning:
      Lapack (http://www.netlib.org/lapack/)libs not found.
      dirs to search for the libs can be specified inthe
      numpy/distutils/site.cfg file(section[lapack])orby setting
      the LAPACK env var.
    self.calc_info()
  lapack_src_info:
    NOT AVAILABLE

  C:\path\AppData\Local\Temp\pip-instal-tt_fysn_\numpy_4c416a770c4e4a078f07d959c6bf4a7c\numpy\distutils\system_info.py:639:UserWarning:
      Lapack (http://www.netlib.org/lapack/)sources not found.
      dirs to search for the sources can be specified inthe
      numpy/distutils/site.cfg file (section[lapack_src])orby setting
      the LAPACK_SRC env var.
    self.calc_info()
    NOT AVAILABLE

  C:\path\anaconda3\lib\site-packages\setuptools\_distutils\dist.py:265:UserWarning:Unknown distribution option:'define_macros'
    warnings.warn(msg)
  runing instal
  C:\path\anaconda3\lib\site-packages\setuptools\comm&\instal.py:34:SetuptoolsDeprecationWarning:setup.py instal is deprecated. Use build & pip & other st&ards-based tools.
    warnings.warn(
  runing build
  runing config_cc
  unifing config_cc,config,build_clib,build_ext,build comm&s --compiler opts
  runing config_fc
  unifing config_fc,config,build_clib,build_ext,build comm&s --fcompiler options
  runing build_src
  build_src
  building py_modules sources
  building lib "npymath" sources
  No module named'numpy.distutils._msvccompiler' in numpy.distutils; tryin from distutils
  eror:Microsoft VisualC++14.0 or greater is required.Get it with "MicrosoftC++BuildTools":https://...
 [end of output]

注意:这个错误来自一个子进程,可能不是pip的问题。将numpy movin的卸载回滚到c:\path\anaconda 3\lib\site-packages\numpy-1.23.5.dist-info
从C:\path\anaconda 3\Lib\site-packages~umpy-1.23.5.dist-info移动到c:\path\anaconda 3\lib\site-packages\numpy
从C:\path\anaconda 3\Lib\site-packages~umpy移动到c:\path\anaconda3\scripts\f2py.exe从C:\path\AppData\Local\Temp\pip-uninstall-xr8_bke0\f2py.exe错误或:legacy-install-failure
×尝试安装pckage时遇到错误。─〉numpy
注意:这是上面提到的pkg的问题,而不是pip提示:参见上面的失败输出

bnl4lu3b

bnl4lu3b1#

您需要升级您尝试安装的numpy版本。
您正在安装的numpy版本1.16.6可以与Python的旧版本(如3.7)一起使用,但不能与Python 3.11一起使用。
在撰写本文时,mxnet已经更新,因此这应该不是问题。但是,如果你需要安装一个仍然引用numpy版本的包,那么无论如何都可以安装它。
您可以使用--no-deps标志来覆盖试图安装旧版本的模块。

pip install --no-deps mxnet # or other module with outdated package requirements
pip install -U numpy # install the most recent version of numpy (or other package in question

注:在撰写本文时,numpy的最新版本是1.24.3

相关问题