a year ago
I am running the project on Railway.
Warning:venv/lib/python3.11/site-packages/requests/__init__.py:109: RequestsDependencyWarning: urllib3 (2.2.1) or chardet (2.3.0)/charset_normalizer (3.3.2) doesn't match a supported version!
Environment: Docker, Ubuntu. Building from Dockerfile.
Relevant Dockerfile lines:
RUN apt-get update
RUN apt-get install -y python3 python3-pip python3-venv libcairo2-dev pkg-config python3-dev tesseract-ocr ffmpeg poppler-utils libportaudio2 swig libpulse-dev libpango1.0-dev
RUN apt-get clean
# Use the virtual environment
RUN python3 -m venv /usr/src/app/venv
# Install dependencies from requirements.txt
RUN /usr/src/app/venv/bin/pip install --no-cache-dir --upgrade --force-reinstall -r /usr/src/app/requirements.txt
Requirements:
wheel
# -- Problematic section --
requests
urllib3>=2.1.0
charset_normalizer
# -------------------------
Other requirements omitted for brevity.
The warning is shown regardless of whether the requests
library is used.
Reading online, the consensus is that updating the requests
library solves the problem, but I am using the latest version (2.31.0) and the warning is still there.
Originally, this was my pip install
line in the Dockerfile:RUN /usr/src/app/venv/bin/pip install --no-cache-dir -r /usr/src/app/requirements.txt
I added the --upgrade
and --force-reinstall
flags to no avail.
It could be an issue with a library I have omitted, but there are 95 in total and many are likely unrelated.
0 Replies
a year ago
why are you installing python from apt?
a year ago
not too sure how that answers the question
using NodeJS for REST API and it opens a child subprocess using the installed python via apt
a year ago
okay now that answers the question
a year ago
after a quick google, looks like you may be installing an older version of requests
a year ago
yeah but im not too sure what the pypi page has to do with this
a year ago
well you are installing something that isnt compatible with something else
a year ago
try running pip install --upgrade requests
in the dockerfile anyway
a year ago
awesome