sadangel

打开终端用pip安装pygame

 

pip install pygame

 

 

 

显示上图信息就说明安装成功

安装完成之后在Python的安装目录中可以找到  \Python xx\Lib\site-packages

 

 

 

打开VSCode  -> 文件 ->首选项 -> 设置 -> 用户 -> 扩展 -> Python ->Auto Complete: Extra Paths -> 在settings.json中编辑

 

 

在json中添加代码如下(将路径换位你的Python中的路径)

"python.autoComplete.addBrackets": true,
"python.autoComplete.extraPath": ["你的路径/Pythonxx/Lib/site-packages"]

 

 

到此就大功告成,pygame 已经可以使用了.

 

分类:

技术点:

相关文章:

  • 2021-05-26
  • 2021-08-21
  • 2021-07-04
  • 2021-08-07
  • 2022-02-02
  • 2021-12-19
  • 2021-04-19
  • 2021-10-22
猜你喜欢
  • 2021-07-01
  • 2022-12-23
  • 2021-06-05
  • 2021-08-14
  • 2021-04-16
  • 2022-12-23
  • 2021-04-03
相关资源
相似解决方案