简体   繁体   English

我已经安装了 Anaconda 并且我也安装了 pygame,但仍然出现错误 ModuleNotFoundError: No module named 'pygame'

[英]I have installed Anaconda and I have installed pygame as well, but still got an error ModuleNotFoundError: No module named 'pygame'

So, I have installed Anaconda3 64 bit and TensorFlow, matplotlib, and I have also installed pygame, but I still got an error saying ModuleNotFoundError: No module named 'pygame' and ModuleNotFoundError: No module named 'pygame'所以,我已经安装了 Anaconda3 64 位和 TensorFlow、matplotlib,并且我还安装了 pygame,但我仍然得到一个错误,说ModuleNotFoundError: No module named 'pygame' ModuleNotFoundError: No module named 'pygame'

In Anaconda, I have made a new environment and that has all of the packages I have installed and I open jupyter notebook from this environment.在 Anaconda 中,我创建了一个新环境,其中包含我已安装的所有软件包,并从该环境中打开 jupyter notebook。 Still the error is there.错误仍然存在。

In Anaconda command prompt:在 Anaconda 命令提示符下:

(base) C:\Users\Eszter>pip install pygame
Requirement already satisfied: pygame in c:\users\eszter\anaconda3\lib\site-packages (2.0.1)

Part of the code is this: **部分代码是这样的:**

import numpy as np
import matplotlib.pyplot as plt
import pygame
from agent import Agent

** **

No module named 'pygame'
No module named 'agent'

Anybody can help me with this?任何人都可以帮助我吗? I really appreciated it.我真的很感激。

Use conda install from anaconda prompt instead of pip从 anaconda 提示符使用 conda conda install而不是pip

conda install pygame

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ModuleNotFoundError:没有名为“加密”的模块。 我已经安装了加密但仍然是同样的错误 - ModuleNotFoundError: No module named 'Crypto'. I have installed crypto but still the same error 收到错误 ModuleNotFoundError: No module named 'mysql' 当我安装它时 - getting error ModuleNotFoundError: No module named 'mysql' when i have installed it ModuleNotFoundError: 没有名为“unidecode”的模块,但我已经安装了该模块 - ModuleNotFoundError: No module named 'unidecode' yet I have the module installed ModuleNotFoundError:即使我安装了功能工具,也没有名为“功能工具”的模块 - ModuleNotFoundError: No module named 'featuretools' even though I have installed featuretools ModuleNotFoundError:没有名为“pandas”的模块 - 当我已经安装了熊猫时 - ModuleNotFoundError: No module named 'pandas' - when I have pandas already installed ModuleNotFoundError:安装后没有名为“pgzrun”的模块? - ModuleNotFoundError: No module named 'pgzrun' when I have it installed? ModuleNotFoundError:没有名为“magenta.protobuf”的模块,但我已经安装了它 - ModuleNotFoundError: No module named 'magenta.protobuf' but I have installed it ModuleNotFoundError:即使在Windows PC中使用anaconda成功安装了opencv库之后,在Spyder IDE中也没有名为“ cv2”的模块 - ModuleNotFoundError: No module named 'cv2' in Spyder IDE, even after I have successfully installed opencv library using anaconda in my windows pc pygame 安装在 pycharm 但仍然没有显示名为 pygame 的模块 - pygame installed in pycharm but still showing no module named pygame 我已经安装了 IPython,但仍然“没有名为‘IPython’的模块” - I have installed IPython, and still "No module named 'IPython'"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM