尝试安装/导入 plyer 模块

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

我安装了它说的plyer模块...

pip install plyer
Requirement already satisfied: plyer in *insert path here*

所以,我认为该模块已经安装,所以我输入代码...

from plyer import notification
notification.notify( title = "Reminder ⏰", message="Break is over time to work..." ,  timeout=10)

但是,它返回一个错误说

Traceback (most recent call last):
  File "c:\Users\#####\Code\Python\Reminder\Reminder.py", line 2, in <module>
    from plyer import notification
ModuleNotFoundError: No module named 'plyer'

NO模块名为'plyer'喜欢什么有人请帮助我......

python module importerror
1个回答
0
投票

好吧,我曾经遇到过同样的问题,我建议您检查以下几点: 1.如果你使用的是VScode,那么检查你是否处于安全模式下,这需要你相信作者或VScode中的目录 2.检查Python和pip版本是否真的安装到你正在使用的Python版本。(虚拟环境也可能导致同样的问题) 3.也许你可以试试

pip3 install -U plyer
安装 希望能帮到你。

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