d2l-ai / d2l-book

Books with Jupyter notebooks
https://book.d2l.ai/
Apache License 2.0
222 stars 95 forks source link

pip unable to resolve the correct awscli version #75

Open dhzdhd opened 1 year ago

dhzdhd commented 1 year ago

I was following CONTRIBUTING docs to work on an issue raised earlier today in d2l-en

When i run pip install git+https://github.com/d2l-ai/d2l-book in my anaconda environment, pip is stuck in a continuous loop of fetching the awscli package, decrementing the package version by a minor version every iteration. See pic below.

Am i doing something wrong or is it a version constraint issue in setup.py?

image

AnirudhDagar commented 1 year ago

Could you please share which version of python you are using in this environment? I just tried creating a fresh conda environment with python3.9 and installing d2lbook worked as expected for me. I'm unable to reproduce your issue.

dhzdhd commented 1 year ago

I am using python version 3.9.16 in my conda environment. Even I created a fresh environment but i face the same problem in the new environment.

AnirudhDagar commented 1 year ago

@dhzdhd I'd need some kind of an MRE to reproduce this issue, since it works perfectly for me in python3.9 conda environment on a macOS as well as tested on Ubuntu22.04 today.

Maybe you can test installing awscli first and then install d2lbook?

dhzdhd commented 1 year ago

Installing awscli first does not work and it produces the same problem. I tried using --use-deprecated=legacy-resolver with pip install and it installed the dependencies without errors

AntoineLhomme commented 1 year ago

I have had the exact same issue while installing the d2l book pip package (pip install d2lbook), the mentionned fix doesn't work for me. It solves the endless loop issue when installing the dependencies but the d2lbook command isn't working after. The new raised issue description : 2 packages awscli and sphinx==5.3.0 don't have any compatible versions for the colorama distribution. (one needs version <0.4.5 while the other wants >=0.4.5) The installation via git didn't work for me aswell.

scruel commented 1 year ago

Installing awscli first does not work and it produces the same problem. I tried using --use-deprecated=legacy-resolver with pip install and it installed the dependencies without errors

ERROR: pip's legacy dependency resolver does not consider dependency conflicts when selecting packages. This behaviour is the source of the following dependency conflicts.
botocore 1.31.26 requires urllib3<1.27,>=1.25.4, but you'll have urllib3 2.0.4 which is incompatible.
awscli 1.29.26 requires colorama<0.4.5,>=0.2.5, but you'll have colorama 0.4.6 which is incompatible.
awscli 1.29.26 requires docutils<0.17,>=0.10, but you'll have docutils 0.19 which is incompatible.
sphinx-autodoc-typehints 1.24.0 requires sphinx>=7.0.1, but you'll have sphinx 5.3.0 which is incompatible.
fangrenfu commented 1 year ago

刚刚尝试尝试在Win10下使用pip install git+https://github.com/d2l-ai/d2l-book ,循环获取awscli问题还是存在。 python 版本3.9.17 。 增加--use-deprecated=legacy-resolver 后,能安装。但是会有错误。 image

在ubuntu 下使用pip install git+https://github.com/d2l-ai/d2l-book 是正常的。