【发布时间】:2019-08-15 01:20:08
【问题描述】:
我不明白为什么 apscheduler 会提出
ModuleNotFoundError: No module named '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: No module named 'apscheduler'
C:\Users\Carl>点子列表 包版本
altgraph 0.16.1 APScheduler 3.6.1 证书 2019.6.16 夏德 3.0.4 日期时间 4.3 未来 0.17.1 idna 2.8 numpy 1.17.0 熊猫 0.25.0 pefile 2019.4.18 点 19.2.2 PyInstaller 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 tzlocal 2.0.0 urllib3 1.25.3 zope.interface 4.6.0
【问题讨论】:
-
发布带有完整回溯的整个错误消息和
pip -V的输出。 -
也许你有两个 Python,你安装在一个 Python 中,但是你用第二个 Python 运行代码。您可以查看
pip -V和python -V或尝试python -m pip install ... -
嗨,Furas,只有一个版本的python
-
File "C:/Users/Carl/Documents/API Insert in SQL Server v2.py", line 28, in
from apscheduler.scheduler.blocking import BlockingScheduler ModuleNotFoundError: No module named '调度程序' -
C:\Users\Carl>python --version Python 3.7.4
标签: python apscheduler