本来只是想用Python做一个定时任务小工具在服务器上运行,可是服务器在隔离区,各种禁止上外网,使用pip导出列表那种下载库的方法不管用,导致Python的各种库都下不到,官网离线下载又各种缺依赖,好气啊.后来查了一下,原来还有pyinstaller这种好东西,将需要的库和程序打包成一个可运行的程序,这正是我需要的. 为了测试pyinstaller,主要遇到了两个错误,一个是pkg_resources.DistributionNotFound,一个是ImportError: No module…
由于依赖EntryPoint,因此apscheduler在离线的方式(直接拷贝然后引用)使用时,会报错. 错误信息类似: No trigger by the name “interval/cron/date” was found 原因: 基类的构造函数依赖于EntryPoint, 如下: class BaseScheduler(six.with_metaclass(ABCMeta)): //... _trigger_plugins = dict((ep.name, ep) for ep in i…