Pandas-0.24.2安装报错

问题描述

1、报错详情

执行 pip install pandas==0.24.2 -i https://pypi.tuna.tsinghua.edu.cn/simple 报错!

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting pandas==0.24.2
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/b2/4c/b6f966ac91c5670ba4ef0b0b5613b5379e3c7abdfad4e7b89a87d73bae13/pandas-
0.24.2.tar.gz (11.8 MB)
     ---------------------------------------- 11.8/11.8 MB 59.4 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [15 lines of output]
      C:\Users\HGP\AppData\Local\Temp\pip-install-46eco03k\pandas_dc457d5d768f428fb303fd3905c3cd3c\setup.py:12: DeprecationWarning:
 pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
        import pkg_resources
      D:\Users\HGP\anaconda3\envs\niid_env\lib\site-packages\setuptools\__init__.py:80: _DeprecatedInstaller: setuptools.installer
and fetch_build_eggs are deprecated.
      !!
     
              ********************************************************************************
              Requirements should be satisfied by a PEP 517 installer.
              If you are using pip, you can try `pip install --use-pep517`.
              ********************************************************************************
     
      !!
        dist.fetch_build_eggs(dist.setup_requires)
      error in pandas setup command: 'install_requires' must be a string or list of strings containing valid project/version requir
ement specifiers; Expected end or semicolon (after version specifier)
          pytz >= 2011k
               ~~~~~~~^
      [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.

2、按照提示执行

pip install --use-pep517 pandas==0.24.2 -i https://pypi.tuna.tsinghua.edu.cn/simple
继续报错:

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting pandas==0.24.2
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b2/4c/b6f966ac91c5670ba4ef0b0b5613b5379e3c7abdfad4e7b89a87d73bae13/pandas
-0.24.2.tar.gz (11.8 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
  ╰─> [4 lines of output]
      <string>:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resource
s.html
      error in pandas setup command: 'install_requires' must be a string or list of strings containing valid project/version requir
ement specifiers; Expected end or semicolon (after version specifier)
          pytz >= 2011k
               ~~~~~~~^
      [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.

3、尝试更换python版本(报错版本为3.8)

网站了解到pandas-0.24.2所支持的版本如下:
在这里插入图片描述

4、python版本更换为3.7

执行
conda install python=3.7 命令

5、重新执行

pip install pandas==0.24.2 -i https://pypi.tuna.tsinghua.edu.cn/simple 如此不会报错了!

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值