Re: [Django] #37106: pylibmc install fails from tests requirements on Python 3.12+ without libmemcached installed

5 views
Skip to first unread message

Django

unread,
May 27, 2026, 4:04:22 AM (4 days ago) May 27
to django-...@googlegroups.com
#37106: pylibmc install fails from tests requirements on Python 3.12+ without
libmemcached installed
-------------------------------------+-------------------------------------
Reporter: Kiko Barr | Owner: Jason
Type: | Judkins
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 6.0
Severity: Normal | Resolution:
Keywords: test, pylibmc | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Malte Gerth):

The same issue was discussed and the PyCon Italy 2026 again.

There are already multiple issues and some discussion around this issue.
* https://code.djangoproject.com/ticket/27876
* https://code.djangoproject.com/ticket/29405
* https://forum.djangoproject.com/t/error-when-installing-requirements-
for-django-tests-fatal-error-libmemcached-memcached-h-file-not-found-
include-libmemcached-memcached-h/1685

Maybe the already existing MR could be reused and be accepted?
* https://github.com/django/django/pull/12660
--
Ticket URL: <https://code.djangoproject.com/ticket/37106#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 27, 2026, 3:29:16 PM (3 days ago) May 27
to django-...@googlegroups.com
#37106: pylibmc install fails from tests requirements on Python 3.12+ without
libmemcached installed
-------------------------------------+-------------------------------------
Reporter: Kiko Barr | Owner: Jason
Type: | Judkins
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 6.0
Severity: Normal | Resolution:
Keywords: test, pylibmc | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Tim Schilling):

Would an admonition that includes the error message and then links to a
Django wiki page that has various platform solutions be amenable? That
allows searching the docs to find the solution, but avoids flooding our
docs with the various platforms' solutions.

I'm not sure the upstream problem will be solved soon. The project is
hopefully transitioning maintainers, but it's in limbo:
https://github.com/lericson/pylibmc/issues/297
--
Ticket URL: <https://code.djangoproject.com/ticket/37106#comment:4>

Django

unread,
May 28, 2026, 7:22:05 AM (2 days ago) May 28
to django-...@googlegroups.com
#37106: pylibmc install fails from tests requirements on Python 3.12+ without
libmemcached installed
-------------------------------------+-------------------------------------
Reporter: Kiko Barr | Owner: Jason
Type: | Judkins
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 6.0
Severity: Normal | Resolution:
Keywords: test, pylibmc | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Tim Schilling):

The python-memcached library is also in a similar state of not being
updated in 8 months with the last release in 2024:
https://github.com/linsomniac/python-memcached
--
Ticket URL: <https://code.djangoproject.com/ticket/37106#comment:5>

Django

unread,
May 28, 2026, 7:35:48 AM (2 days ago) May 28
to django-...@googlegroups.com
#37106: pylibmc install fails from tests requirements on Python 3.12+ without
libmemcached installed
-------------------------------------+-------------------------------------
Reporter: Kiko Barr | Owner: Jason
Type: | Judkins
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 6.0
Severity: Normal | Resolution:
Keywords: test, pylibmc | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Tim Graham):

I think the simplest option would be to instruct contributors to comment
out the dependency if it doesn't install for them as they're unlikely to
need it.
--
Ticket URL: <https://code.djangoproject.com/ticket/37106#comment:6>

Django

unread,
May 28, 2026, 5:00:59 PM (2 days ago) May 28
to django-...@googlegroups.com
#37106: pylibmc install fails from tests requirements on Python 3.12+ without
libmemcached installed
-------------------------------------+-------------------------------------
Reporter: Kiko Barr | Owner: Jason
Type: | Judkins
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 6.0
Severity: Normal | Resolution:
Keywords: test, pylibmc | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Johannes Maron):

Ref #37098

We just added support to pass `LIBMEMCACHED` to tox.

The following works on a fresh macOS with Homebrew:

{{{
brew install libmemcached
echo 'export LIBMEMCACHED="${HOMEBREW_PREFIX}"' >> ~/.profile
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/37106#comment:7>

Django

unread,
May 28, 2026, 5:05:04 PM (2 days ago) May 28
to django-...@googlegroups.com
#37106: pylibmc install fails from tests requirements on Python 3.12+ without
libmemcached installed
-------------------------------------+-------------------------------------
Reporter: Kiko Barr | Owner: Jason
Type: | Judkins
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 6.0
Severity: Normal | Resolution:
Keywords: test, pylibmc | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Johannes Maron):

BTW, if we update the docs, maybe we point people towards **Tox** instead
of manually fiddling with `./tests/runtests.py`

{{{
tox -e py3 -- path.to.test
# and
tox -e docs
}}}

works for OK most patches unless you have to run Selenium or, worse,
Oracle…
--
Ticket URL: <https://code.djangoproject.com/ticket/37106#comment:8>

Django

unread,
May 28, 2026, 5:39:00 PM (2 days ago) May 28
to django-...@googlegroups.com
#37106: pylibmc install fails from tests requirements on Python 3.12+ without
libmemcached installed
-------------------------------------+-------------------------------------
Reporter: Kiko Barr | Owner: Jason
Type: | Judkins
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 6.0
Severity: Normal | Resolution:
Keywords: test, pylibmc | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Tim Schilling):

The person who had offered to help maintain pylibmc has started
maintaining a fork until activity resumes:
https://pypi.org/project/pylibmc2/
--
Ticket URL: <https://code.djangoproject.com/ticket/37106#comment:9>
Reply all
Reply to author
Forward
0 new messages