Openpyxl missing 'jdcal'

て烟熏妆下的殇ゞ 提交于 2019-11-30 03:41:28

问题


I tried to install the openpyxl module, but during the installation it showed some errors with JDcall. When I then try to import it, I get this error:

 Traceback (most recent call last):
  File "C:\Andrzej\workspace\sandbox\sandbox.py", line 7, in <module>
    import openpyxl 

  File "C:\Python34\lib\site-packages\openpyxl-2.0.5-py3.4.egg\openpyxl\__init__.py", line 29, in <module>
    from openpyxl.workbook import Workbook

  File "C:\Python34\lib\site-packages\openpyxl-2.0.5-py3.4.egg\openpyxl\workbook\__init__.py", line 25, in <module>
    from .workbook import *

  File "C:\Python34\lib\site-packages\openpyxl-2.0.5-py3.4.egg\openpyxl\workbook\workbook.py", line 35, in <module>
    from openpyxl.worksheet import Worksheet

  File "C:\Python34\lib\site-packages\openpyxl-2.0.5-py3.4.egg\openpyxl\worksheet\__init__.py", line 25, in <module>
    from .worksheet import *

  File "C:\Python34\lib\site-packages\openpyxl-2.0.5-py3.4.egg\openpyxl\worksheet\worksheet.py", line 35, in <module>
    import openpyxl.cell

  File "C:\Python34\lib\site-packages\openpyxl-2.0.5-py3.4.egg\openpyxl\cell\__init__.py", line 25, in <module>
    from .cell import *

  File "C:\Python34\lib\site-packages\openpyxl-2.0.5-py3.4.egg\openpyxl\cell\cell.py", line 47, in <module>
    from openpyxl.date_time import (

  File "C:\Python34\lib\site-packages\openpyxl-2.0.5-py3.4.egg\openpyxl\date_time.py", line 34, in <module>
    from jdcal import (

ImportError: No module named 'jdcal'

I get this same problem for Python 3.4 and 3.3, how can I solve it?


回答1:


You should install jdcal separately. After this, install Openpyxl. I faced the same issue - after doing this, it got resolved




回答2:


jdcal is a library required by openpyxl but should be installed automatically. How are you installing openpyxl?




回答3:


I managed to get openpyxl to work by uninstalling openpyxl, jdcall and et-xmlfile, then reinstalling all three, then upgrading all three.

Not sure why it works, and the error messages are still there, but I was able to successfully import openpyxl and create a workbook.




回答4:


After I downloaded the jdcal-x.x.x.tar.gz from https://pypi.org/project/jdcal/#files and extracted it in \path\to\pythonxx\Lib\site-packages\ I had to copy the jdcal.py file from \path\to\pythonxx\Lib\site-packages\jdcal-1.4.1\ to \path\to\pythonxx\Lib\site-packages\ in order to work.



来源:https://stackoverflow.com/questions/25360450/openpyxl-missing-jdcal

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