无法安装Pygame

问题描述 投票:0回答:1

所以我前一段时间安装并运行了Pygame,我有点停止了编程。我最近又回来重新开始,发现我的模块都没有安装了。当我尝试重新安装Pygame时,我收到以下消息:

Traceback (most recent call last):
  File "/Applications/PyCharm CE.app/Contents/helpers/packaging_tool.py", line 192, in main
    retcode = do_install(pkgs)
  File "/Applications/PyCharm CE.app/Contents/helpers/packaging_tool.py", line 109, in do_install
    return pip.main(['install'] + pkgs) AttributeError: module 'pip' has no attribute 'main'

有谁知道如何解决这个问题?我试过通过命令终端运行命令,但它不起作用。我在Mac上。

编辑:通过重新安装python解决 - 感谢帮助无论如何球员:)

python macos pygame macos-sierra
1个回答
0
投票

我尝试安装Sklearn时遇到了同样的问题,我修改了packaging_tool.py:

add this

from pip import __main__

change the line 109:

return pip.__main__._main(['install'] + pkgs)

有用!

© www.soinside.com 2019 - 2024. All rights reserved.