Matplotlib Visual Studio元数据生成失败

7lrncoxx  于 2023-08-06  发布在  其他
关注(0)|答案(1)|浏览(127)

我在Visual Studio代码中下载matplotlib时遇到问题。
我的基本错误是

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

字符串
但在其长度

PS C:\Users\mar.formosaurquhart\stuff_python> pip install keyboard
Collecting keyboard
  Using cached keyboard-0.13.5-py3-none-any.whl (58 kB)
Installing collected packages: keyboard
stuff_python\venv\Scripts\python.exe -m pip install --upgrade pip' comman
(venv) PS C:\Users\mar.formosaurquhart\stuff_python> pip install keyboard
Requirement already satisfied: keyboard in c:\users\mar.formosaurquhart\st\stuff_python\venv\Scripts\python.exe -m pip install --upgrade pip' command.
(venv) PS C:\Users\mar.formosaurquhart\stuff_python> pip install keyboard
Requirement already satisfied: keyboard in c:\users\mar.formosaurquhart\stuff_python\venv\lib\site-packages (0.13.5)
WARNING: You are using pip version 21.2.4; however, version 23.2.1 is available.
You should consider upgrading via the 'C:\Users\mar.formosaurquhart\stuff_python\venv\Scripts\python.exe -m pip install --upgrade pip' command.
(venv) PS C:\Users\mar.formosaurquhart\stuff_python> pip install matplotlib
Collecting matplotlib
  Using cached matplotlib-3.7.2-cp39-cp39-win32.whl (7.3 MB)
Collecting pyparsing<3.1,>=2.3.1
  Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Collecting kiwisolver>=1.0.1
  Using cached kiwisolver-1.4.4-cp39-cp39-win32.whl (46 kB)
Collecting contourpy>=1.0.1
  Using cached contourpy-1.1.0.tar.gz (13.4 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\mar.formosaurquhart\stuff_python\venv\Scripts\python.exe' 'C:\Users\mar.formosaurquhart\stuff_python\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\MAR~1.FOR\AppData\Local\Temp\tmpvqswun5n'
         cwd: C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-h11n5ap7\contourpy_28e9270cf2c44db18fd40b81f5ad96e8
    Complete output (12 lines):
    + meson setup C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-h11n5ap7\contourpy_28e9270cf2c44db18fd40b81f5ad96e8 C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-h11n5ap7\contourpy_28e9270cf2c44db18fd40b81f5ad96e8\.mesonpy-a1ohuof6\build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --vsenv --native-file=C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-h11n5ap7\contourpy_28e9270cf2c44db18fd40b81f5ad96e8\.mesonpy-a1ohuof6\build\meson-python-native-file.ini
    The Meson build system
    Version: 1.2.0
    Source dir: C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-h11n5ap7\contourpy_28e9270cf2c44db18fd40b81f5ad96e8
    Build dir: C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-h11n5ap7\contourpy_28e9270cf2c44db18fd40b81f5ad96e8\.mesonpy-a1ohuof6\build
    Build type: native build
    Project name: contourpy
    Project version: 1.1.0

    ..\..\meson.build:1:0: ERROR: Could not find C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe

    A full log can be found at C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-h11n5ap7\contourpy_28e9270cf2c44db18fd40b81f5ad96e8\.mesonpy-a1ohuof6\build\meson-logs\meson-log.txt
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/a7/3b/632c003e1dfbc82d32c0466762f2d2cf139d26032626dc65944e38d0e5b9/contourpy-1.1.0.tar.gz#sha256=e53046c3863828d21d531cc3b53786e6580eb1ba02477e8681009b6aa0870b21 (from https://pypi.org/simple/contourpy/) (requires-python:>=3.8). Command errored out with exit status 1: 'C:\Users\mar.formosaurquhart\stuff_python\venv\Scripts\python.exe' 'C:\Users\mar.formosaurquhart\stuff_python\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\MAR~1.FOR\AppData\Local\Temp\tmpvqswun5n' Check the logs for full command output.    
  Using cached contourpy-1.0.7-cp39-cp39-win32.whl (143 kB)
Collecting pillow>=6.2.0
  Using cached Pillow-10.0.0.tar.gz (50.5 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting numpy>=1.20
  Using cached numpy-1.25.2-cp39-cp39-win32.whl (12.7 MB)
Collecting importlib-resources>=3.2.0
  Using cached importlib_resources-6.0.0-py3-none-any.whl (31 kB)
Collecting packaging>=20.0
  Using cached packaging-23.1-py3-none-any.whl (48 kB)
Collecting cycler>=0.10
  Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting python-dateutil>=2.7
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting fonttools>=4.22.0
  Using cached fonttools-4.42.0-cp39-cp39-win32.whl (2.1 MB)
Collecting zipp>=3.1.0
  Using cached zipp-3.16.2-py3-none-any.whl (7.2 kB)
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Building wheels for collected packages: pillow
  Building wheel for pillow (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\mar.formosaurquhart\stuff_python\venv\Scripts\python.exe' 'C:\Users\mar.formosaurquhart\stuff_python\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Users\MAR~1.FOR\AppData\Local\Temp\tmpkuj2uvqm'
       cwd: C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-h11n5ap7\pillow_03aac6e8a715462084a8b0e0bbd28b6f
  Complete output (198 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win32-cpython-39
  creating build\lib.win32-cpython-39\PIL
  copying src\PIL\BdfFontFile.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\BlpImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\BmpImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\BufrStubImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ContainerIO.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\CurImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\DcxImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\DdsImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\EpsImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ExifTags.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\features.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\FitsImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\FliImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\FontFile.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\FpxImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\FtexImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\GbrImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\GdImageFile.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\GifImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\GimpGradientFile.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\GimpPaletteFile.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\GribStubImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\Hdf5StubImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\IcnsImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\IcoImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\Image.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImageChops.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImageCms.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImageColor.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImageDraw.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImageDraw2.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImageEnhance.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImageFile.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImageFilter.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImageFont.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImageGrab.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImageMath.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImageMode.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImageMorph.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImageOps.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImagePalette.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImagePath.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImageQt.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImageSequence.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImageShow.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImageStat.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImageTk.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImageTransform.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImageWin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\ImtImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\IptcImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\Jpeg2KImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\JpegImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\JpegPresets.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\McIdasImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\MicImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\MpegImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\MpoImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\MspImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\PaletteFile.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\PalmImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\PcdImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\PcfFontFile.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\PcxImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\PdfImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\PdfParser.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\PixarImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\PngImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\PpmImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\PsdImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\PSDraw.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\PyAccess.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\QoiImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\SgiImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\SpiderImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\SunImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\TarIO.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\TgaImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\TiffImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\TiffTags.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\WalImageFile.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\WebPImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\WmfImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\XbmImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\XpmImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\XVThumbImagePlugin.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\_binary.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\_deprecate.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\_tkinter_finder.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\_util.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\_version.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\__init__.py -> build\lib.win32-cpython-39\PIL
  copying src\PIL\__main__.py -> build\lib.win32-cpython-39\PIL
  running egg_info
  writing src\Pillow.egg-info\PKG-INFO
  writing dependency_links to src\Pillow.egg-info\dependency_links.txt
  writing requirements to src\Pillow.egg-info\requires.txt
  writing top-level names to src\Pillow.egg-info\top_level.txt
  reading manifest file 'src\Pillow.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no files found matching '*.c'
  warning: no files found matching '*.h'
  warning: no files found matching '*.sh'
  warning: no files found matching '*.txt'
  warning: no previously-included files found matching '.appveyor.yml'
  warning: no previously-included files found matching '.clang-format'
  warning: no previously-included files found matching '.coveragerc'
  warning: no previously-included files found matching '.editorconfig'
  warning: no previously-included files found matching '.readthedocs.yml'
  warning: no previously-included files found matching 'codecov.yml'
  warning: no previously-included files found matching 'renovate.json'
  warning: no previously-included files matching '.git*' found anywhere in distribution    
  warning: no previously-included files matching '*.so' found anywhere in distribution     
  no previously-included directories found matching '.ci'
  adding license file 'LICENSE'
  writing manifest file 'src\Pillow.egg-info\SOURCES.txt'
  running build_ext

  The headers or library files could not be found for zlib,
  a required dependency when compiling Pillow from source.

  Please see the install instructions at:
     https://pillow.readthedocs.io/en/latest/installation.html

  Traceback (most recent call last):
    File "<string>", line 988, in <module>
    File "C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-build-env-vo61pk65\overlay\Lib\site-packages\setuptools\__init__.py", line 107, in setup
      return distutils.core.setup(**attrs)
    File "C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-build-env-vo61pk65\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
      return run_commands(dist)
    File "C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-build-env-vo61pk65\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
      dist.run_commands()
    File "C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-build-env-vo61pk65\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-build-env-vo61pk65\overlay\Lib\site-packages\setuptools\dist.py", line 1234, in run_command
      super().run_command(command)
    File "C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-build-env-vo61pk65\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-build-env-vo61pk65\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 346, in run
      self.run_command("build")
    File "C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-build-env-vo61pk65\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-build-env-vo61pk65\overlay\Lib\site-packages\setuptools\dist.py", line 1234, in run_command
      super().run_command(command)
    File "C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-build-env-vo61pk65\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-build-env-vo61pk65\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
      self.run_command(cmd_name)
    File "C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-build-env-vo61pk65\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-build-env-vo61pk65\overlay\Lib\site-packages\setuptools\dist.py", line 1234, in run_command
      super().run_command(command)
    File "C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-build-env-vo61pk65\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-build-env-vo61pk65\overlay\Lib\site-packages\setuptools\command\build_ext.py", line 84, in run
      _build_ext.run(self)
    File "C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-build-env-vo61pk65\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 345, in run
      self.build_extensions()
    File "<string>", line 811, in build_extensions
  __main__.RequiredDependencyException: zlib

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "C:\Users\mar.formosaurquhart\stuff_python\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 349, in <module>
      main()
    File "C:\Users\mar.formosaurquhart\stuff_python\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 331, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "C:\Users\mar.formosaurquhart\stuff_python\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 248, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-h11n5ap7\pillow_03aac6e8a715462084a8b0e0bbd28b6f\_custom_build\backend.py", line 53, in build_wheel
      return super().build_wheel(wheel_directory, config_settings, metadata_directory)     
    File "C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-build-env-vo61pk65\overlay\Lib\site-packages\setuptools\build_meta.py", line 416, in build_wheel
      return self._build_with_temp_dir(['bdist_wheel'], '.whl',
    File "C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-build-env-vo61pk65\overlay\Lib\site-packages\setuptools\build_meta.py", line 401, in _build_with_temp_dir
      self.run_setup()
    File "C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-h11n5ap7\pillow_03aac6e8a715462084a8b0e0bbd28b6f\_custom_build\backend.py", line 47, in run_setup
      return super().run_setup(setup_script)
    File "C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-build-env-vo61pk65\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup
      exec(code, locals())
    File "<string>", line 1005, in <module>
  __main__.RequiredDependencyException:

  The headers or library files could not be found for zlib,
  a required dependency when compiling Pillow from source.
  Please see the install instructions at:
     https://pillow.readthedocs.io/en/latest/installation.html

  ----------------------------------------
  ERROR: Failed building wheel for pillow
Failed to build pillow
ERROR: Could not build wheels for pillow which use PEP 517 and cannot be installed directlyWARNING: You are using pip version 21.2.4; however, version 23.2.1 is available.
You should consider upgrading via the 'C:\Users\mar.formosaurquhart\stuff_python\venv\Scrip(venv) PS C:\Users\mar.formosaurquhart\stuff_python> python -mpip install -U pip
Requirement already satisfied: pip in c:\users\mar.formosaurquhart\stuff_python\venv\lib\site-packages (21.2.4)
Collecting pip
  Using cached pip-23.2.1-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.2.4
    Uninstalling pip-21.2.4:
      Successfully uninstalled pip-21.2.4
Successfully installed pip-23.2.1
(venv) PS C:\Users\mar.formosaurquhart\stuff_python> python -mpip install -U matplotlib    
Collecting matplotlib
  Obtaining dependency information for matplotlib from https://files.pythonhosted.org/packages/80/99/6cb77705e4801b4483410b9b917790fdc2da311ec8dd1ed8c9e90320c0e1/matplotlib-3.7.2-cp39-cp39-win32.whl.metadata
  Downloading matplotlib-3.7.2-cp39-cp39-win32.whl.metadata (5.8 kB)
Collecting contourpy>=1.0.1 (from matplotlib)
  Using cached contourpy-1.1.0.tar.gz (13.4 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [12 lines of output]
      + meson setup C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-sn56rrg9\contourpy_7b98591287aa4465b49d10646634c0ad C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-sn56rrg9\contourpy_7b98591287aa4465b49d10646634c0ad\.mesonpy-9sxu8bop\build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --vsenv --native-file=C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-sn56rrg9\contourpy_7b98591287aa4465b49d10646634c0ad\.mesonpy-9sxu8bop\build\meson-python-native-file.ini
      The Meson build system
      Version: 1.2.0
      Source dir: C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-sn56rrg9\contourpy_7b98591287aa4465b49d10646634c0ad
      Build dir: C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-sn56rrg9\contourpy_7b98591287aa4465b49d10646634c0ad\.mesonpy-9sxu8bop\build
      Build type: native build
      Project name: contourpy
      Project version: 1.1.0
     
      ..\..\meson.build:1:0: ERROR: Could not find C:\Program Files (x86)\Microsoft Visual 
Studio\Installer\vswhere.exe
     
      A full log can be found at C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-sn56rrg9\contourpy_7b98591287aa4465b49d10646634c0ad\.mesonpy-9sxu8bop\build\meson-logs\meson-log.txt     
      [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.
(venv) PS C:\Users\mar.formosaurquhart\stuff_python> python -mpip install -U matplotlib  
Collecting matplotlib
  Obtaining dependency information for matplotlib from https://files.pythonhosted.org/packages/80/99/6cb77705e4801b4483410b9b917790fdc2da311ec8dd1ed8c9e90320c0e1/matplotlib-3.7.2-cp39-cp39-win32.whl.metadata       
  Using cached matplotlib-3.7.2-cp39-cp39-win32.whl.metadata (5.8 kB)
Collecting contourpy>=1.0.1 (from matplotlib)
  Using cached contourpy-1.1.0.tar.gz (13.4 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [12 lines of output]
d18e4fc6ba7e0323b9558c36 C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-x9h8yges\contourpy_092b96e5d18e4fc6ba7e0323b9558c36\.mesonpy-p0gvd7il\build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --vsenv --native-file=C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-x9h8yges\contourpy_092b96e5d18e4fc6ba7e0323b9558c36\.mesonpy-p0gvd7il\build\meson-python-native-file.ini
      The Meson build system
      Version: 1.2.0
      Source dir: C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-x9h8yges\contourpy_092b96e5d18e4fc6ba7e0323b9558c36
      Build dir: C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-x9h8yges\contourpy_092b96e5d18e4fc6ba7e0323b9558c36\.mesonpy-p0gvd7il\build
      Build type: native build
      Project name: contourpy
      Project version: 1.1.0
     
      ..\..\meson.build:1:0: ERROR: Could not find C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe
     
      A full log can be found at C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-x9h8yges\contourpy_092b96e5d18e4fc6ba7e0323b9558c36\.mesonpy-p0gvd7il\build\meson-logs\meson-log.txt
      [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.
(venv) PS C:\Users\mar.formosaurquhart\stuff_python> pip install python-matplotlib
ERROR: Could not find a version that satisfies the requirement python-matplotlib (from versions: none)     
ERROR: No matching distribution found for python-matplotlib
(venv) PS C:\Users\mar.formosaurquhart\stuff_python> pip install matplotlib --use-deprecated=legacy-resolver
Collecting matplotlib
  Using cached matplotlib-3.7.2-cp39-cp39-win32.whl (7.3 MB)
Collecting contourpy>=1.0.1 (from matplotlib)
  Using cached contourpy-1.1.0.tar.gz (13.4 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [12 lines of output]
      + meson setup C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-79rkcmx5\contourpy C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-79rkcmx5\contourpy\.mesonpy-kkm20kji\build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --vsenv --native-file=C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-79rkcmx5\contourpy\.mesonpy-kkm20kji\build\meson-python-native-file.ini
      The Meson build system
      Version: 1.2.0
      Source dir: C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-79rkcmx5\contourpy
      Build dir: C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-79rkcmx5\contourpy\.mesonpy-kkm20kji\build
      Build type: native build
      Project name: contourpy
      Project version: 1.1.0
     
      ..\..\meson.build:1:0: ERROR: Could not find C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe
     
      A full log can be found at C:\Users\mar.formosaurquhart\AppData\Local\Temp\pip-install-79rkcmx5\contourpy\.mesonpy-kkm20kji\build\meson-logs\meson-log.txt
      [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.
╰─> contourpy

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
(venv) PS C:\Users\mar.formosaurquhart\stuff_python> pip install matplotlib --use-deprecated=backtrack-on-build-failures

Usage:
  pip install [options] <requirement specifier> [package-index-options] ...
  pip install [options] -r <requirements file> [package-index-options] ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...

option --use-deprecated: invalid choice: 'backtrack-on-build-failures' (choose from 'legacy-resolver')     
(venv) PS C:\Users\mar.formosaurquhart\stuff_python> --use-deprecated=backtrack-on-build-failures
At line:1 char:3
+ --use-deprecated=backtrack-on-build-failures
+   ~
Missing expression after unary operator '--'.
At line:1 char:3
+ --use-deprecated=backtrack-on-build-failures
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token 'use-deprecated=backtrack-on-build-failures' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingExpressionAfterOperator


我已经尝试了pip install keyboard我也尝试了pip install matplotlib,但发生了类似的错误,我已经尝试使用我也尝试了pip install --pre matplotlib和我的点子和其他东西是最新的,所以这不应该是问题。我的代码没有其他错误,可以在我的其他Python程序上运行。

uplii1fm

uplii1fm1#

请尝试下面的命令来安装您的模块,在某些情况下,它可以帮助:

pip install keyboard --use-deprecated=legacy-resolver

字符串

相关问题