如何让pip install pandas命令工作?

how do I get the pip install pandas command to work?

提问人:Seji 提问时间:11/17/2023 更新时间:11/17/2023 访问量:51

问:

我想安装 pandas,因为我在 python 脚本中需要它。但是当我运行 pip install pandas 命令时,出现以下错误:

消息错误:

Collecting pandas
  Using cached pandas-2.1.3.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: 1
  ╰─> [12 lines of output]
      + meson setup C:\Users\titouan\AppData\Local\Temp\pip-install-2m33b6wv\pandas_d0cbd89973b2444cb852211ba74ff89a C:\Users\titouan\AppData\Local\Temp\pip-install-2m33b6wv\pandas_d0cbd89973b2444cb852211ba74ff89a\.mesonpy-1gtwaj3m\build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --vsenv --native-file=C:\Users\titouan\AppData\Local\Temp\pip-install-2m33b6wv\pandas_d0cbd89973b2444cb852211ba74ff89a\.mesonpy-1gtwaj3m\build\meson-python-native-file.ini
      The Meson build system
      Version: 1.2.1
      Source dir: C:\Users\titouan\AppData\Local\Temp\pip-install-2m33b6wv\pandas_d0cbd89973b2444cb852211ba74ff89a
      Build dir: C:\Users\titouan\AppData\Local\Temp\pip-install-2m33b6wv\pandas_d0cbd89973b2444cb852211ba74ff89a\.mesonpy-1gtwaj3m\build
      Build type: native build
      Project name: pandas
      Project version: 2.1.3

      ..\..\meson.build:2:0: ERROR: Could not parse vswhere.exe output

      A full log can be found at C:\Users\titouan\AppData\Local\Temp\pip-install-2m33b6wv\pandas_d0cbd89973b2444cb852211ba74ff89a\.mesonpy-1gtwaj3m\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.

所以我尝试更新 pip,但它没有改变任何东西。所以我想知道如何成功安装熊猫?

问候

蟒蛇 熊猫 点子

评论

0赞 Larry OBrien 11/17/2023
那个介子日志.txt文件可能会为出了什么问题提供更好的线索
0赞 eatmeimadanish 11/17/2023
stackoverflow.com/questions/72401377/......
0赞 Seji 11/18/2023
当我尝试查找完整日志时,我在 meson-log.txt 的目录中没有任何内容。
0赞 Seji 11/18/2023
我的python版本是3.11.3。

答: 暂无答案