LKI / chinese-calendar

判断一天是不是法定节假日/法定工作日(查看节假日安排)
https://pypi.org/project/chinesecalendar/
MIT License
1.06k stars 185 forks source link

关于更新日期问题 #75

Closed cymx66688 closed 2 years ago

cymx66688 commented 2 years ago

如果要使用最新的日期,像现在马上要2022年了,是不是必须要更新版本才可以取到2022年的日期数据呀

FankLi commented 2 years ago

安装最新的包:pip install chinese_calendar==1.6.0

但是报错: ERROR: Could not find a version that satisfies the requirement chinese_calendar==1.6.0 ERROR: No matching distribution found for chinese_calendar==1.6.0

请问是什么原因呢?挺急的,现在生产上报错,多谢回复

LKI commented 2 years ago

@FankLi python 版本是多少?

LKI commented 2 years ago

可以使用 pip install -U chinesecalendar 来安装哈~

FankLi commented 2 years ago

是python3.6 pip install -U chinesecalendar可以安装1.6.0版本,但是代码里import chinese_calendar,报错不存在(import chinesecalendar也不存在)。 我记得之前是pip install chinese_calendar(包名称有下划线分隔的)

LKI commented 2 years ago

那你再试试 pip install -U chinese_calendar

这个项目提供了两个包,应该都是可以的

LKI commented 2 years ago

@cymx66688 是的,你只要更新依赖就可以了。 一般每年在国务院发布公告的时候,本项目就会更新了~