testerSunshine / 12306

12306智能刷票,订票
MIT License
33.9k stars 9.79k forks source link

docker-compose 启动失败: Could not find a version that satisfies the requirement ntplib==0.3.3 #772

Open lsk-boy-f opened 4 years ago

lsk-boy-f commented 4 years ago

描述问题

在Mac或者Ubuntu上,通过 docker-compose 启动项目失败

重现步骤

1. clone or downlaod project
2. 按需修改 TickerConfig.py
3. 执行 `docker-compose up --build` 

截图&日志

 ---> 4ccdc35c9228
Step 10/13 : COPY requirements-docker37.txt ./
 ---> Using cache
 ---> 5cc53a6c4263
Step 11/13 : RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -r requirements-docker37.txt
 ---> Running in f1c28d438bbb
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting bs4==0.0.1
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/10/ed/7e8b97591f6f456174139ec089c769f89a94a1a4025fe967691de971f314/bs4-0.0.1.tar.gz (1.1 kB)
Collecting requests==2.18.4
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/49/df/50aa1999ab9bde74656c2919d9c0c085fd2b3775fd3eca826012bef76d8c/requests-2.18.4-py2.py3-none-any.whl (88 kB)
Collecting Pillow
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e8/f2/6722dd0c22e3a143ac792ccb2424924ac72af4adea756b1165b4cad50da7/Pillow-7.2.0-cp37-cp37m-manylinux1_x86_64.whl (2.2 MB)
Collecting wrapcache==1.0.8
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/39/5f/fee52c29d0887a0457f256d7503d2bea1ad3fe9d02d269b1374db400a757/wrapcache-1.0.8.zip (16 kB)
ERROR: Could not find a version that satisfies the requirement ntplib==0.3.3 (from -r requirements-docker37.txt (line 5)) (from versions: 0.3.4)
ERROR: No matching distribution found for ntplib==0.3.3 (from -r requirements-docker37.txt (line 5))
ERROR: Service 'ticket' failed to build: The command '/bin/sh -c pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -r requirements-docker37.txt' returned a non-zero code: 1

环境信息

or

额外的备注

cick commented 4 years ago

其实就是个ntplib库更新了你需要把 ,你如果用本地安装就把requirements-docker37.txt 更改为ntplib==0.3.4

lsk-boy-f commented 4 years ago

其实就是个ntplib库更新了你需要把 ,你如果用本地安装就把requirements-docker37.txt 更改为ntplib==0.3.4

是的,所以我顺带提了个pr,免得不熟悉的人爬坑了

lizhecao commented 4 years ago

谢谢,更新到0.3.4就可以了

yuhal commented 3 years ago

赞同@lizhecao,把 ntplib 的版本从0.3.3更新到0.3.4之后,可以正常启动。 从这两个文件中更改,requirements.txt 和 requirements-docker37.txt。

shunkanghe commented 3 years ago

多谢 各位大佬