requests dependency warning
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:
Requirements:
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.16 Replies
Project ID:
b88cd4f4-3e33-4c82-8bb1-90877719ae87
b88cd4f4-3e33-4c82-8bb1-90877719ae87
@Brody any ideas?
why are you installing python from apt?
its a sandbox
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
okay now that answers the question
after a quick google, looks like you may be installing an older version of requests
yeah but im not too sure what the pypi page has to do with this
The pypi page doesnt have the latest version recorded?
outputs:
2.31.0
well you are installing something that isnt compatible with something else
it may be an omitted package ^
but theres so many ðŸ˜
try running
pip install --upgrade requests
in the dockerfile anywayok
Solution
Upgrading pip before installing requirements solved the issue
awesome