Pycharm pandas安装问题,“这是一个Meson错误,应该报告!”

ddrv8njm  于 11个月前  发布在  PyCharm
关注(0)|答案(2)|浏览(469)

我尝试使用pippip install pandas)在Pycharm中安装Pandas,并得到以下错误:

Collecting pandas
  Using cached pandas-2.1.4.tar.gz (4.3 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 2
  ╰─> [48 lines of output]
+ meson setup C:\Users\karras\AppData\Local\Temp\pip-install-vibg7f38\pandas_61d0262f7482412ca98548131df7fc12 C:\Users\karras\AppData\Local\Temp\pip-install-vibg7f38\pandas_61d0262f7482412ca98548131df7fc12\.mesonpy-zms6t414\build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --vsenv --native-
file=C:\Users\karras\AppData\Local\Temp\pip-install-vibg7f38\pandas_61d0262f7482412ca98548131df7fc12\.mesonpy-zms6t414\build\meson-python-native-file.ini
      Traceback (most recent call last):
        File "C:\Users\karras\AppData\Local\Temp\pip-build-env-a55wpluz\overlay\Lib\site-packages\mesonbuild\mesonmain.py", line 194, in run
          return options.run_func(options)
        File "C:\Users\karras\AppData\Local\Temp\pip-build-env-a55wpluz\overlay\Lib\site-packages\mesonbuild\msetup.py", line 358, in run
          app.generate()
        File "C:\Users\karras\AppData\Local\Temp\pip-build-env-a55wpluz\overlay\Lib\site-packages\mesonbuild\msetup.py", line 183, in generate
          return self._generate(env, capture, vslite_ctx)
        File "C:\Users\karras\AppData\Local\Temp\pip-build-env-a55wpluz\overlay\Lib\site-packages\mesonbuild\msetup.py", line 205, in _generate
          intr = interpreter.Interpreter(b, user_defined_options=user_defined_options)
        File "C:\Users\karras\AppData\Local\Temp\pip-build-env-a55wpluz\overlay\Lib\site-packages\mesonbuild\interpreter\interpreter.py", line 330, in __init__
          self.parse_project()
        File "C:\Users\karras\AppData\Local\Temp\pip-build-env-a55wpluz\overlay\Lib\site-packages\mesonbuild\interpreterbase\interpreterbase.py", line 134, in parse_project
          self.evaluate_codeblock(self.ast, end=1)
        File "C:\Users\karras\AppData\Local\Temp\pip-build-env-a55wpluz\overlay\Lib\site-packages\mesonbuild\interpreterbase\interpreterbase.py", line 190, in evaluate_codeblock
          raise e
        File "C:\Users\karras\AppData\Local\Temp\pip-build-env-a55wpluz\overlay\Lib\site-packages\mesonbuild\interpreterbase\interpreterbase.py", line 182, in evaluate_codeblock
          self.evaluate_statement(cur)
        File "C:\Users\karras\AppData\Local\Temp\pip-build-env-a55wpluz\overlay\Lib\site-packages\mesonbuild\interpreterbase\interpreterbase.py", line 196, in evaluate_statement
          return self.function_call(cur)
        File "C:\Users\karras\AppData\Local\Temp\pip-build-env-a55wpluz\overlay\Lib\site-packages\mesonbuild\interpreterbase\interpreterbase.py", line 521, in function_call
          res = func(node, func_args, kwargs)
        File "C:\Users\karras\AppData\Local\Temp\pip-build-env-a55wpluz\overlay\Lib\site-packages\mesonbuild\interpreterbase\decorators.py", line 277, in wrapper
          return f(*nargs, **wrapped_kwargs)
        File "C:\Users\karras\AppData\Local\Temp\pip-build-env-a55wpluz\overlay\Lib\site-packages\mesonbuild\interpreterbase\decorators.py", line 596, in wrapper
          return f(*wrapped_args, **wrapped_kwargs)
        File "C:\Users\karras\AppData\Local\Temp\pip-build-env-a55wpluz\overlay\Lib\site-packages\mesonbuild\interpreter\interpreter.py", line 1308, in func_project
          mesonlib.setup_vsenv(force_vsenv)
        File "C:\Users\karras\AppData\Local\Temp\pip-build-env-a55wpluz\overlay\Lib\site-packages\mesonbuild\utils\vsenv.py", line 118, in setup_vsenv
          return _setup_vsenv(force)
        File "C:\Users\karras\AppData\Local\Temp\pip-build-env-a55wpluz\overlay\Lib\site-packages\mesonbuild\utils\vsenv.py", line 57, in _setup_vsenv
          bat_json = subprocess.check_output(
        File "C:\Users\karras\AppData\Local\Programs\Python\Python310-32\lib\subprocess.py", line 420, in check_output
          return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
        File "C:\Users\karras\AppData\Local\Programs\Python\Python310-32\lib\subprocess.py", line 524, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\vswhere.exe', '-latest', '-prerelease', '-requiresAny', '-requires', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64', '-requires', 'Microsoft.VisualStudio.Workload.WDExpress', '-products', '*', '
-utf8', '-format', 'json']' returned non-zero exit status 87.
      The Meson build system
      Version: 1.2.1
      Source dir: C:\Users\karras\AppData\Local\Temp\pip-install-vibg7f38\pandas_61d0262f7482412ca98548131df7fc12
      Build dir: C:\Users\karras\AppData\Local\Temp\pip-install-vibg7f38\pandas_61d0262f7482412ca98548131df7fc12\.mesonpy-zms6t414\build
      Build type: native build
      Project name: pandas
      Project version: 2.1.4
     
      ..\..\meson.build:2:0: ERROR: Unhandled python exception
     
          This is a Meson bug and should be reported!
      [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.

字符串
有什么想法是错的吗?

8fsztsew

8fsztsew1#

就像@tripleee提到的,你的错误消息说'这是一个Meson bug,应该报告!'。你可以report the bug here,也可以搜索你的特定错误消息“....\meson.build:2:0:ERROR:Unhandled python exception”,以查看类似问题的可能解决方案。

ssm49v7z

ssm49v7z2#

最后,我报告了Meson错误,错误是由于过时的vswhere.exe,Meson没有优雅地处理它。更新Microsoft VS并选择特定的pandas版本(pip install pandas==2.0.3),我设法安装了pandas。

相关问题