Permanertly 2023-02-10 16:30 采纳率: 0%
浏览 38

安装 cocos2d 失败

一、安装 cocos2d 失败

试过大部分的网上的解决方案:
1.pip换python.exe
2.更换国内清华路径
3.路径后加信任:--trusted-host
4.更新setuptools
5.更新 pip
都不行。。

报错信息如下:

PS D:\practiceProject\Games> pip install cocos2d 
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting cocos2d
  Using cached https://mirrors.aliyun.com/pypi/packages/2f/45/d3efb5f3e635adc5b49ee2b890910c672f4c98b927a820230abadde9c9bf/cocos2d-0.6.9.tar.gz (4.7 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [7 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\2\AppData\Local\Temp\pip-install-hv_ehjsj\cocos2d_4c205c14ac5c4f9a93bd317df50fe00d\setup.py", line 38, in <module>
          f = open('README.rst','rU')
              ^^^^^^^^^^^^^^^^^^^^^^^
      ValueError: invalid mode: 'rU'
      [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.

如有 “大ge” 知晓怎么回事,麻烦告知!感谢!

  • 写回答

2条回答 默认 最新

  • 元气少女缘结神 2023-02-10 16:48
    关注

    命令换成 python -m pip install cocos2d
    或者卸载setuptools,重新安装

    评论 编辑记录

报告相同问题?

问题事件

  • 创建了问题 2月10日