I deploy my project by ansible, I always get the error: ImportError: No module named zipfile

我与影子孤独终老i 提交于 2020-01-06 05:30:17

问题


fatal: [45.76.146.29]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Shared connection to 45.76.146.29 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File \"/root/.ansible/tmp/ansible-tmp-1507867975.52-212330775158986/apt.py\", line 17, in \r\n import zipfile\r\nImportError: No module named zipfile\r\n", "msg": "MODULE FAILURE", "rc": 0}

what cause this error?


回答1:


You have some reduced installation of python on your system.
I've seen such error on old linux images at Vultr.

Try with apt-get install sudo python-minimal python-setuptools



来源:https://stackoverflow.com/questions/46722521/i-deploy-my-project-by-ansible-i-always-get-the-error-importerror-no-module-n

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!