我想不通为什么 apscheduler 想出了
ModuleNotFoundError:没有名为“apscheduler”的模块
我试过卸载它,使用较早的版本。
我正在运行 python 3.7.4,pip 版本 19.2.2
已安装 3.6.1 版本的 apscheduler
from datetime import datetime
import os
from apscheduler.schedulers.blocking import BlockingScheduler
if __name__ == '__main__':
scheduler = BlockingScheduler()
scheduler.add_job(Get_Current_Location, 'interval', seconds=10)
print('Press Ctrl+{0} to exit'.format('Break' if os.name == 'nt' else 'C'))
try:
scheduler.start()
except (KeyboardInterrupt, SystemExit):
pass
ModuleNotFoundError: 没有名为“apscheduler”的模块
C:\Users\Carl>点列表 包版本
altgraph 0.16.1 APScheduler 3.6.1 证书 2019.6.16 chardet 3.0.4 日期时间 4.3 future 0.17.1 idna 2.8 NumPy 1.17.0 Pandas 0.25.0 文件 2019.4.18 点子 19.2.2 安装程序 3.5 pyodbc 4.0.27 python-dateutil 2.8.0 pytz 2019.2 pywin32-ctypes 0.2.0 请求 2.22.0 安装工具 40.8.0 六个 1.12.0 本地 2.0.0 urllib3 1.25.3 zope.interface 4.6.0
最佳答案
使用 pip3 安装失败。
我从PyPi下载APScheduler并直接安装,同样的问题。
我有一种预感,我重新启动了我的笔记本电脑,它成功了!
我不知道为什么,我在安装模块时从来没有遇到过问题,但重启后它就可以工作了。 试试看吧!
关于python - 没有名为 'apscheduler' 的模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57503812/