Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想修改现有的工作表。当我输入
from xlutils.copy import copy
然后我得到了
ImportError: No module named copy
我已经尝试从不同的方式重新安装 xlutils,它仍然无法正常工作。Lib\site-packages\xlutils\copy.py 也存在。我该怎么办?谢谢 :)
我都试过了
from xlutils.copy import copy from xlutils import copy
两者都有效。看来您的 python 库不在您的库路径中。试试下面的代码:
import sys print (sys.path)
并检查您的库路径是否存在。如果不使用以下方法添加库路径:
sys.path.append('/your-lib-path')
在 python 代码中,或将 lib 路径添加到您的环境变量 PYTHONPATH