鱼C论坛

 找回密码
 立即注册
查看: 1690|回复: 4

[已解决]windows10 安装openyxl报错

[复制链接]
发表于 2021-1-5 17:27:35 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
python版本是3.8.3,安装openyxl的时候报如下错误,是什么原因呀?

D:\Users\zhuyingchao\openpyxl-3.0.5>python setup.py install
running install
running bdist_egg
running egg_info
writing openpyxl.egg-info\PKG-INFO
writing dependency_links to openpyxl.egg-info\dependency_links.txt
writing requirements to openpyxl.egg-info\requires.txt
writing top-level names to openpyxl.egg-info\top_level.txt
reading manifest file 'openpyxl.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'openpyxl\sample'
no previously-included directories found matching 'openpyxl\benchmarks'
no previously-included directories found matching 'openpyxl\develop'
no previously-included directories found matching 'scratchpad'
no previously-included directories found matching 'doc'
writing manifest file 'openpyxl.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
copying openpyxl.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
copying openpyxl.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying openpyxl.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying openpyxl.egg-info\requires.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying openpyxl.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist\openpyxl-3.0.5-py3.8.egg' and adding 'build\bdist.win-amd64\egg' to it
Traceback (most recent call last):
  File "setup.py", line 62, in <module>
    setup(
  File "C:\Users\zhuyingchao\AppData\Local\Programs\Python\Python38\lib\site-packages\setuptools\__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\zhuyingchao\AppData\Local\Programs\Python\Python38\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Users\zhuyingchao\AppData\Local\Programs\Python\Python38\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "C:\Users\zhuyingchao\AppData\Local\Programs\Python\Python38\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\zhuyingchao\AppData\Local\Programs\Python\Python38\lib\site-packages\setuptools\command\install.py", line 67, in run
    self.do_egg_install()
  File "C:\Users\zhuyingchao\AppData\Local\Programs\Python\Python38\lib\site-packages\setuptools\command\install.py", line 109, in do_egg_install
    self.run_command('bdist_egg')
  File "C:\Users\zhuyingchao\AppData\Local\Programs\Python\Python38\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\zhuyingchao\AppData\Local\Programs\Python\Python38\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\zhuyingchao\AppData\Local\Programs\Python\Python38\lib\site-packages\setuptools\command\bdist_egg.py", line 233, in run
    make_zipfile(self.egg_output, archive_root, verbose=self.verbose,
  File "C:\Users\zhuyingchao\AppData\Local\Programs\Python\Python38\lib\site-packages\setuptools\command\bdist_egg.py", line 497, in make_zipfile
    visit(z, dirname, files)
  File "C:\Users\zhuyingchao\AppData\Local\Programs\Python\Python38\lib\site-packages\setuptools\command\bdist_egg.py", line 490, in visit
    z.write(path, p)
  File "C:\Users\zhuyingchao\AppData\Local\Programs\Python\Python38\lib\zipfile.py", line 1740, in write
    zinfo = ZipInfo.from_file(filename, arcname,
  File "C:\Users\zhuyingchao\AppData\Local\Programs\Python\Python38\lib\zipfile.py", line 538, in from_file
    zinfo = cls(arcname, date_time)
  File "C:\Users\zhuyingchao\AppData\Local\Programs\Python\Python38\lib\zipfile.py", line 361, in __init__
    raise ValueError('ZIP does not support timestamps before 1980')
ValueError: ZIP does not support timestamps before 1980

D:\Users\zhuyingchao\openpyxl-3.0.5>date
当前日期: 2021/01/05 周二
最佳答案
2021-1-5 18:20:15
zhuyingchao 发表于 2021-1-5 17:31
没找到哪里有1980以前的时间戳,这个应该怎么解决呢

安装包的问题,直接pip install openpyxl就可以了,没必要从文件安装
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2021-1-5 17:30:23 From FishC Mobile | 显示全部楼层
ZIP不支持1980年以前的时间戳
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2021-1-5 17:31:43 | 显示全部楼层
没找到哪里有1980以前的时间戳,这个应该怎么解决呢
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2021-1-5 18:20:15 From FishC Mobile | 显示全部楼层    本楼为最佳答案   
zhuyingchao 发表于 2021-1-5 17:31
没找到哪里有1980以前的时间戳,这个应该怎么解决呢

安装包的问题,直接pip install openpyxl就可以了,没必要从文件安装
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2021-1-5 18:27:43 | 显示全部楼层
嗯,pip安装可以
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-1-16 20:00

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表