ImportError: bad magic number make sure your test modules/packages have valid Python names 原因是源码编译里面python版本不对 需要删除掉源码 .pyc 文件 重新编译就可以了 find .-name '*.pyc'-delete python -m compileall .