coderefinery / sphinx-lesson

Sphinx extension for creating CodeRefinery lessons
https://coderefinery.github.io/sphinx-lesson/
MIT License
14 stars 20 forks source link

Build problems on Python 3.9.2 #63

Closed bast closed 3 years ago

bast commented 3 years ago

I am getting jupyter-packaging 0.9.1 requires setuptools>=49.4.0, but you'll have setuptools 49.2.1 which is incompatible with the following requirements.txt (which is used in 2 lessons):

sphinx-lesson
Sphinx
sphinx_rtd_theme
sphinx_rtd_theme_ext_color_contrast
myst_nb

I have used the following steps:

python -m venv venv
source venv/bin/activate
python -m pip install -r requirements.txt
bast commented 3 years ago

I am on Python 3.9.2 and my local setuptools is 54.2.0 so the inconsistency seems to be arriving from the environment.

samumantha commented 3 years ago

Overread the python version and created a new conda environment with pip and the requirements for Python 3.9.4 which seems to be working, trying again with Python 3.9.2 now

bast commented 3 years ago

Interesting. Same problematic behavior for me installing only sphinx-lesson:

python -m venv venv
source venv/bin/activate
python -m pip install sphinx-lesson
bast commented 3 years ago

OK false alarm. It seems pip was too old and I was surprised that it needs to be upgraded separately. Thanks for testing.

samumantha commented 3 years ago

Same results with Python 3.9.2, I am on Ubuntu 20.04.2, and used conda to create an environment with Python 3.9.2, installed pip into it and then the requirements. Setup tools Version is 52.0.0 after this and sphinx-build runs without issues on the documentation lesson.

rkdarst commented 3 years ago

do you know what your old and new versions of pip were? I recently learned that pip basically doesn't resolve dependencies: it goes through and handles it top to bottom. I knew it was bad, but not that bad: https://stackoverflow.com/a/55826767 I had been meaning to research this more to see just what the situation is, but hadn't gotten around to it yet.

I see recent pip has been adding a new resolver but haven't yet learned a lot about it. It has all kind of implications for my crusade against unnecessary pinning of dependencies (does in not matter, since pip ignores them, and this is what makes pip fast compared to conda (implication: people pin dependencies but without cause, so it works even if they are not resolved? is it very important (snce pip can't handle them and will fail with a first-match algorithm? If the second, which that SO answer implies, why don't we see it more often?)

bast commented 3 years ago

My problematic old pip was 20.2.3. Problem disappeared with 21.0.1.

bast commented 3 years ago

After this I added this line to my ve alias: https://github.com/bast/config/blob/63eaa8cdfa85c6e7f68213ba70300511b0d6d992/omf/init.fish#L46