执行python脚本文件时发生错误。
python版本是2.7.10
Traceback (most recent call last):
File "/Users/zl96/Sites/mobileSMSPythonv2/mobileSMS/mobileSMSlocal.py", line 17, in <module>
import psutil #to get process memory usage
File "/Users/zl96/Sites/mobileSMSPythonv2/mobileSMS/psutil/__init__.py", line 151, in <module>
from . import _psosx as _psplatform
File "/Users/zl96/Sites/mobileSMSPythonv2/mobileSMS/psutil/_psosx.py", line 16, in <module>
from . import _psutil_osx as cext
ImportError: cannot import name '_psutil_osx' from partially initialized module 'psutil' (most likely due to a circular import)
这就是我解决问题的方法:我从站点包中删除了所有名为psutil
的文件夹。
pip install psutil
然后我收到错误消息:
ModuleNotFoundError: No module named 'aem.ae'
根据本网站的建议:xlwings 0.6.1使用python 3.5 在Mac OS X上导入错误
然后我输入:
pip uninstall appscript
pip install appscript
这解决了问题。