CTFd / CTFd

CTFs as you need them

Home Page:https://ctfd.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python package version conflicts

reald opened this issue · comments

Environment:

  • CTFd Version/Commit: ef6752c
  • Operating System: Debian GNU/Linux 12 (bookworm)

What happened?

$> pip install -r requirements.txt
[...]
ERROR: Cannot install -r requirements.txt (line 78) and greenlet==2.0.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested greenlet==2.0.1
    gevent 23.9.1 depends on greenlet>=3.0rc3; platform_python_implementation == "CPython" and python_version >= "3.11"

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

What did you expect to happen?

All python packages are installed in venv.

How to reproduce your issue

$> source venv/bin/activate
$> pip install -r requirements.txt

Any associated stack traces or error logs

ERROR: Cannot install -r requirements.txt (line 78) and greenlet==2.0.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested greenlet==2.0.1
    gevent 23.9.1 depends on greenlet>=3.0rc3; platform_python_implementation == "CPython" and python_version >= "3.11"

pip-compile generated this with gevent showing greenlet==2.0.1 so something must have changed here?

https://github.com/CTFd/CTFd/blob/ef6752cc8c52fac62efbe17782b0b5c77ee31476/requirements.txt#L78C1-L83

I see, this was changed at some point: https://www.gevent.org/changelog.html#bugfixes

I will fix this in 3.7.

Ah this is because you are on Python 3.11 or 3.12. CTFd currently uses 3.9 but it's worth updating the version.

Should be fixed now with #2449