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

安装 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日

悬赏问题

  • ¥15 preLaunchTask"C/C++: aarch64- apple-darwin22-g++-14 生成活动 文件”已终止,退出代码为-1。
  • ¥18 关于#贝叶斯概率#的问题:这篇文章中利用em算法求出了对数似然值作为概率表参数,然后进行概率表计算,这个概率表是怎样计算的呀
  • ¥20 C#上传XML格式数据
  • ¥15 elementui上传结合oss接口断点续传,现在只差停止上传和继续上传,各大精英看下
  • ¥100 单片机hardfaulr
  • ¥20 手机截图相片分辨率降低一半
  • ¥50 求一段sql语句,遇到小难题了,可以50米解决
  • ¥15 速求,对多种商品的购买力优化问题(用遗传算法、枚举法、粒子群算法、模拟退火算法等方法求解)
  • ¥100 速求!商品购买力最优化问题(用遗传算法求解,给出python代码)
  • ¥15 虚拟机检测,可以是封装好的DLL,可付费