簡體   English   中英

我正在嘗試安裝 matplotlib,但出現了這個長錯誤

[英]I was trying to install matplotlib but I'm getting this long error

我試圖安裝 matplotlib,但出現了這個長錯誤。 我真的不知道出了什么問題。

ERROR: Command errored out with exit status 1:
     command: 'C:\Python310\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Bilguun\\AppData\\Local\\Temp\\pip-install-5dbg4g23\\matplotlib_2ff15b65402b457db67b768d26133471\\setup.py'"'"'; __file__='"'"'C:\\Users\\Bilguun\\AppData\\Local\\Temp\\pip-install-5dbg4g23\\matplotlib_2ff15b65402b457db67b768d26133471\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Bilguun\AppData\Local\Temp\pip-pip-egg-info-hmkaun62'
         cwd: C:\Users\Bilguun\AppData\Local\Temp\pip-install-5dbg4g23\matplotlib_2ff15b65402b457db67b768d26133471\
    Complete output (282 lines):
    WARNING: The wheel package is not available.
      ERROR: Command errored out with exit status 1:
       command: 'C:\Python310\python.exe' 'C:\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Users\Bilguun\AppData\Local\Temp\tmp2vupi6yj'        
           cwd: C:\Users\Bilguun\AppData\Local\Temp\pip-wheel-pl_1iot6\numpy_c3c60903cf3b4f4d8adb6cfb88649051
      Complete output (233 lines):
      setup.py:63: RuntimeWarning: NumPy 1.21.2 may not yet support Python 3.10.
        warnings.warn(
      Running from numpy source directory.
      C:\Users\Bilguun\AppData\Local\Temp\pip-wheel-pl_1iot6\numpy_c3c60903cf3b4f4d8adb6cfb88649051\tools\cythonize.py:69: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
        from distutils.version import LooseVersion
      Processing numpy/random\_bounded_integers.pxd.in
      Processing numpy/random\bit_generator.pyx
      Processing numpy/random\mtrand.pyx
      Processing numpy/random\_bounded_integers.pyx.in
      Processing numpy/random\_common.pyx
      Processing numpy/random\_generator.pyx
      Processing numpy/random\_mt19937.pyx
      Processing numpy/random\_pcg64.pyx
      Processing numpy/random\_philox.pyx
      Processing numpy/random\_sfc64.pyx
      Cythonizing sources
      blas_opt_info:
      blas_mkl_info:
      No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
      customize MSVCCompiler
        libraries mkl_rt not found in ['C:\\Python310\\lib', 'C:\\', 'C:\\Python310\\libs']
        NOT AVAILABLE

      blis_info:
        libraries blis not found in ['C:\\Python310\\lib', 'C:\\', 'C:\\Python310\\libs']
        NOT AVAILABLE

      openblas_info:
        libraries openblas not found in ['C:\\Python310\\lib', 
'C:\\', 'C:\\Python310\\libs']
      get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
      customize GnuFCompiler
      Could not locate executable g77
      Could not locate executable f77
      customize IntelVisualFCompiler
      Could not locate executable ifort
      Could not locate executable ifl
      customize AbsoftFCompiler
      Could not locate executable f90
      customize CompaqVisualFCompiler
      Could not locate executable DF
      customize IntelItaniumVisualFCompiler
      Could not locate executable efl
      customize Gnu95FCompiler
      Found executable C:\MinGW\bin\gfortran.exe
      Using built-in specs.
      COLLECT_GCC=C:\MinGW\bin\gfortran.exe
      COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper.exe
      Target: mingw32
      Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i586 --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --with-tune=generic --enable-libgomp --disable-libvtv --enable-nls
      Thread model: win32
      gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)
        NOT AVAILABLE

      accelerate_info:
        NOT AVAILABLE

      atlas_3_10_blas_threads_info:
      Setting PTATLAS=ATLAS
        libraries tatlas not found in ['C:\\Python310\\lib', 'C:\\', 'C:\\Python310\\libs']
        NOT AVAILABLE

      atlas_3_10_blas_info:
        libraries satlas not found in ['C:\\Python310\\lib', 'C:\\', 'C:\\Python310\\libs']
        NOT AVAILABLE

      atlas_blas_threads_info:
      Setting PTATLAS=ATLAS
        libraries ptf77blas,ptcblas,atlas not found in ['C:\\Python310\\lib', 'C:\\', 'C:\\Python310\\libs']
        NOT AVAILABLE

      atlas_blas_info:
        libraries f77blas,cblas,atlas not found in ['C:\\Python310\\lib', 'C:\\', 'C:\\Python310\\libs']
        NOT AVAILABLE

      C:\Users\Bilguun\AppData\Local\Temp\pip-wheel-pl_1iot6\numpy_c3c60903cf3b4f4d8adb6cfb88649051\numpy\distutils\system_info.py:2026: UserWarning:
          Optimized (vendor) Blas libraries are not found.     
          Falls back to netlib Blas library which has worse performance.
          A better performance should be easily gained by switching
          Blas library.
        if self._calc_info(blas):
      blas_info:
        libraries blas not found in ['C:\\Python310\\lib', 'C:\\', 'C:\\Python310\\libs']
        NOT AVAILABLE

      C:\Users\Bilguun\AppData\Local\Temp\pip-wheel-pl_1iot6\numpy_c3c60903cf3b4f4d8adb6cfb88649051\numpy\distutils\system_info.py:2026: UserWarning:
          Blas (http://www.netlib.org/blas/) libraries not found.
          Directories to search for the libraries can be specified in the
          numpy/distutils/site.cfg file (section [blas]) or by 
setting
          the BLAS environment variable.
        if self._calc_info(blas):
      blas_src_info:
        NOT AVAILABLE

      C:\Users\Bilguun\AppData\Local\Temp\pip-wheel-pl_1iot6\numpy_c3c60903cf3b4f4d8adb6cfb88649051\numpy\distutils\system_info.py:2026: UserWarning:
          Blas (http://www.netlib.org/blas/) sources not found.          Directories to search for the sources can be specified in the
          numpy/distutils/site.cfg file (section [blas_src]) or by setting
          the BLAS_SRC environment variable.
        if self._calc_info(blas):
        NOT AVAILABLE

      non-existing path in 'numpy\\distutils': 'site.cfg'      
      lapack_opt_info:
      lapack_mkl_info:
        libraries mkl_rt not found in ['C:\\Python310\\lib', 'C:\\', 'C:\\Python310\\libs']
        NOT AVAILABLE

      openblas_lapack_info:
        libraries openblas not found in ['C:\\Python310\\lib', 
'C:\\', 'C:\\Python310\\libs']
      get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
      customize GnuFCompiler
      customize IntelVisualFCompiler
      customize AbsoftFCompiler
      customize CompaqVisualFCompiler
      customize IntelItaniumVisualFCompiler
      customize Gnu95FCompiler
      Using built-in specs.
      COLLECT_GCC=C:\MinGW\bin\gfortran.exe
      COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper.exe
      Target: mingw32
      Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i586 --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --with-tune=generic --enable-libgomp --disable-libvtv --enable-nls
      Thread model: win32
      gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)
        NOT AVAILABLE

      openblas_clapack_info:
        libraries openblas,lapack not found in ['C:\\Python310\\lib', 'C:\\', 'C:\\Python310\\libs']
      get_default_fcompiler: matching types: '['gnu', 'intelv, 
 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
      customize GnuFCompiler
      customize IntelVisualFCompiler
      customize AbsoftFCompiler
      customize CompaqVisualFCompiler
      customize IntelItaniumVisualFCompiler
      customize Gnu95FCompiler
      Using built-in specs.
      COLLECT_GCC=C:\MinGW\bin\gfortran.exe
      COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper.exe
      Target: mingw32
      Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i586 --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --with-tune=generic --enable-libgomp --disable-libvtv --enable-nls
      Thread model: win32
      gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)
        NOT AVAILABLE

      flame_info:
        libraries flame not found in ['C:\\Python310\\lib', 'C:\\', 'C:\\Python310\\libs']
        NOT AVAILABLE

      atlas_3_10_threads_info:
      Setting PTATLAS=ATLAS
        libraries lapack_atlas not found in C:\Python310\lib   
        libraries tatlas,tatlas not found in C:\Python310\lib  
        libraries lapack_atlas not found in C:\
        libraries tatlas,tatlas not found in C:\
        libraries lapack_atlas not found in C:\Python310\libs  
        libraries tatlas,tatlas not found in C:\Python310\libs 
      <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
        NOT AVAILABLE

      atlas_3_10_info:
        libraries lapack_atlas not found in C:\Python310\lib   
        libraries satlas,satlas not found in C:\Python310\lib  
        libraries lapack_atlas not found in C:\
        libraries satlas,satlas not found in C:\
        libraries lapack_atlas not found in C:\Python310\libs  
        libraries satlas,satlas not found in C:\Python310\libs 
      <class 'numpy.distutils.system_info.atlas_3_10_info'>    
        NOT AVAILABLE

      atlas_threads_info:
      Setting PTATLAS=ATLAS
        libraries lapack_atlas not found in C:\Python310\lib   
        libraries ptf77blas,ptcblas,atlas not found in C:\Python310\lib
        libraries lapack_atlas not found in C:\
        libraries ptf77blas,ptcblas,atlas not found in C:\     
        libraries lapack_atlas not found in C:\Python310\libs  
        libraries ptf77blas,ptcblas,atlas not found in C:\Python310\libs
      <class 'numpy.distutils.system_info.atlas_threads_info'> 
        NOT AVAILABLE

      atlas_info:
        libraries lapack_atlas not found in C:\Python310\lib   
        libraries f77blas,cblas,atlas not found in C:\Python310\lib
        libraries lapack_atlas not found in C:\
        libraries f77blas,cblas,atlas not found in C:\
        libraries lapack_atlas not found in C:\Python310\libs  
        libraries f77blas,cblas,atlas not found in C:\Python310\libs
      <class 'numpy.distutils.system_info.atlas_info'>
        NOT AVAILABLE

      lapack_info:
        libraries lapack not found in ['C:\\Python310\\lib', 'C:\\', 'C:\\Python310\\libs']
        NOT AVAILABLE

      C:\Users\Bilguun\AppData\Local\Temp\pip-wheel-pl_1iot6\numpy_c3c60903cf3b4f4d8adb6cfb88649051\numpy\distutils\system_info.py:1858: UserWarning:
          Lapack (http://www.netlib.org/lapack/) libraries not 
found.
          Directories to search for the libraries can be specified in the
          numpy/distutils/site.cfg file (section [lapack]) or by setting
          the LAPACK environment variable.
        return getattr(self, '_calc_info_{}'.format(name))()   
      lapack_src_info:
        NOT AVAILABLE

      C:\Users\Bilguun\AppData\Local\Temp\pip-wheel-pl_1iot6\numpy_c3c60903cf3b4f4d8adb6cfb88649051\numpy\distutils\system_info.py:1858: UserWarning:
          Lapack (http://www.netlib.org/lapack/) sources not found.
          Directories to search for the sources can be specified in the
          numpy/distutils/site.cfg file (section [lapack_src]) 
or by setting
          the LAPACK_SRC environment variable.
        return getattr(self, '_calc_info_{}'.format(name))()   
        NOT AVAILABLE

      numpy_linalg_lapack_lite:
        FOUND:
          language = c
          define_macros = [('HAVE_BLAS_ILP64', None), ('BLAS_SYMBOL_SUFFIX', '64_')]

      Warning: attempted relative import with no known parent package
      C:\Python310\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
        warnings.warn(msg)
      running bdist_wheel
      running build
      running config_cc
      unifing config_cc, config, build_clib, build_ext, build commands --compiler options
      running config_fc
      unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
      running build_src
      build_src
      building py_modules sources
      creating build
      creating build\src.win-amd64-3.10
      creating build\src.win-amd64-3.10\numpy
      creating build\src.win-amd64-3.10\numpy\distutils        
      building library "npymath" sources
      error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
      ----------------------------------------
      ERROR: Failed building wheel for numpy
    ERROR: Failed to build one or more wheels
    Traceback (most recent call last):
      File "C:\Python310\lib\site-packages\setuptools\installer.py", line 75, in fetch_build_egg
        subprocess.check_call(cmd)
      File "C:\Python310\lib\subprocess.py", line 369, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['C:\\Python310\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\Bilguun\\AppData\\Local\\Temp\\tmpq3kp_gfg', '--quiet', 'numpy>=1.16']' returned non-zero exit status 1.

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Bilguun\AppData\Local\Temp\pip-install-5dbg4g23\matplotlib_2ff15b65402b457db67b768d26133471\setup.py", line 258, in <module>
        setup(  # Finally, pass this all along to distutils to 
do the heavy lifting.
      File "C:\Python310\lib\site-packages\setuptools\__init__.py", line 152, in setup
        _install_setup_requires(attrs)
      File "C:\Python310\lib\site-packages\setuptools\__init__.py", line 147, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "C:\Python310\lib\site-packages\setuptools\dist.py", line 806, in fetch_build_eggs
        resolved_dists = pkg_resources.working_set.resolve(    
      File "C:\Python310\lib\site-packages\pkg_resources\__init__.py", line 766, in resolve
        dist = best[req.key] = env.best_match(
      File "C:\Python310\lib\site-packages\pkg_resources\__init__.py", line 1051, in best_match
        return self.obtain(req, installer)
      File "C:\Python310\lib\site-packages\pkg_resources\__init__.py", line 1063, in obtain
        return installer(requirement)
      File "C:\Python310\lib\site-packages\setuptools\dist.py", line 877, in fetch_build_egg
        return fetch_build_egg(self, req)
      File "C:\Python310\lib\site-packages\setuptools\installer.py", line 77, in fetch_build_egg
        raise DistutilsError(str(e)) from e
    distutils.errors.DistutilsError: Command '['C:\\Python310\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\Bilguun\\AppData\\Local\\Temp\\tmpq3kp_gfg', '--quiet', 'numpy>=1.16']' returned non-zero exit status 1.

    Edit setup.cfg to change the build options; suppress output with --quiet.

    BUILDING MATPLOTLIB
      matplotlib: yes [3.4.1]
          python: yes [3.10.0 (tags/v3.10.0:b494f59, Oct  4 2021, 19:00:18) [MSC
                      v.1929 64 bit (AMD64)]]
        platform: yes [win32]
           tests: no  [skipping due to configuration]
          macosx: no  [Mac OS-X only]

我找到了解決這個問題的方法是刪除fuc-ng python 3.10並安裝python 3.9.7我認為這個問題稍后會解決,但現在你不能使用最新的python版本

我發現了一個臨時的(不穩定)修復有關Python 3.10有人不顧一切地跑matplotlib(和許多其他軟件包,例如numba,scikit學習,SciPy的,等等)的Windows 10,描述如下阿米特思 Amit 使用由加州大學歐文分校的Christoph Gohlke策划的不穩定二進制文件源,因此這些文件很可能沒有感染惡意軟件。

這是這篇文章的副本,它有一個合法但臨時(不穩定)的解決方案。

單擊下面的鏈接並為您在機器上安裝的 python 版本安裝 matplotlib 包:

https://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib

然后轉到命令提示符,將目錄更改為下載文件夾,然后鍵入 py -m pip install matplotlib-3.4.3-cp310-cp310-win_amd64.whl

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM