我在暂存环境中拥有APScheduler-3.5.1和Python 2.6.6。
运行APScheduler时出现错误:
ImportError:没有名为apscheduler.schedulers.background的模块
相同的代码在使用Python 2.7.5的Dev环境中工作正常。 我尝试使用pip2.6在python 2.6(staging)上安装
Traceback (most recent call last):
File "check_executor.py", line 22, in <module>
from apscheduler.schedulers.background import BackgroundScheduler
File "/usr/lib/python2.6/site-packages/apscheduler/schedulers/background.py", line 5, in <module>
from apscheduler.schedulers.base import BaseScheduler
File "/usr/lib/python2.6/site-packages/apscheduler/schedulers/base.py", line 19, in <module>
from apscheduler.jobstores.memory import MemoryJobStore
File "/usr/lib/python2.6/site-packages/apscheduler/jobstores/memory.py", line 4, in <module>
from apscheduler.util import datetime_to_utc_timestamp
File "/usr/lib/python2.6/site-packages/apscheduler/util.py", line 141
values = {k: int(v or 0) for k, v in values.items()}
我尝试了APScheduler-2.1.2,但是遇到导入错误,旧的版本无法满足我的要求。是否支持python 2.6.6版本,还是我还需要考虑其他事项?