2019年11月27日星期三

pip install openpyxl问题解决

使用python2安装openpyxl时一直遇到一个问题:
Collecting openpyxl
  Using cached https://files.pythonhosted.org/packages/f4/5f/fb8706fba43b46716e252fdd3ffdfe801a63a0f4663b80b6f3421d85ab70/openpyxl-3.0.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-qUECOe/openpyxl/setup.py", line 28, in <module>
        from importlib.util import module_from_spec, spec_from_file_location
    ImportError: No module named util

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-qUECOe/openpyxl/

发现装3.x版本都不行,pip install pip install openpyxl==2.6.4,换成旧版本之后,解决问题。

没有评论:

发表评论