导入模块错误python3 xubuntu 19.04
import module error python3 xubuntu 19.04
使用解释器导入 PyGame 时成功。使用 Geany 则不是。
显示错误。
我试过编辑 shebang,重命名文件。确保路径和版本正确,并且没有丢失 Geany 插件。
import pygame
pygame.init()
Geany 中的错误:
Traceback (most recent call last):
File "moduleerror.py", line 3, in <module>
import pygame
ImportError: No module named pygame
我进入构建 >> 设置构建命令并在执行命令下更改
python "%f"
到
python3“%f”
使用解释器导入 PyGame 时成功。使用 Geany 则不是。
我试过编辑 shebang,重命名文件。确保路径和版本正确,并且没有丢失 Geany 插件。
import pygame
pygame.init()
Geany 中的错误:
Traceback (most recent call last):
File "moduleerror.py", line 3, in <module>
import pygame
ImportError: No module named pygame
我进入构建 >> 设置构建命令并在执行命令下更改
python "%f"
到
python3“%f”