tljh-config ContextualVersionConflict - chardet 4 vs jupyterhub-traefik-proxy
See original GitHub issueBug description
tljh-config failing to run after a fresh container rebuild of integration-tests/Dockerfile . Was working for me last install round.
as best I can tell - something in the tljh install is installing chardet 4, which conflicts with the pinned aiohttp==3.6.2
in jupyterhub-traefik-proxy; tried to pip upgrade chardet/aiohttp, but this triggered errors. Not sure if it would be better to file against jupyterhub-traefik-proxy
or here; filing here since this is where I encountered the error, and concievably the aiohttp pin is deliberate in jupyterhub-traefik-proxy
was able to resolve via:
. /opt/tljh/hub/bin/activate
pip uninstall chardet
pip install chardet==3.0.4
Expected behaviour
tljh-config
should run
Actual behaviour
root@b65e93e47512:/srv/src# tljh-config set auth.GenericOAuthenticator.client_id 'client1'
Traceback (most recent call last):
File "/opt/tljh/hub/lib/python3.6/site-packages/pkg_resources/__init__.py", line 574, in _build_master
ws.require(__requires__)
File "/opt/tljh/hub/lib/python3.6/site-packages/pkg_resources/__init__.py", line 892, in require
needed = self.resolve(parse_requirements(requirements))
File "/opt/tljh/hub/lib/python3.6/site-packages/pkg_resources/__init__.py", line 783, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (chardet 4.0.0 (/opt/tljh/hub/lib/python3.6/site-packages), Requirement.parse('chardet<4.0,>=2.0'), {'aiohttp'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/tljh-config", line 6, in <module>
from pkg_resources import load_entry_point
File "/opt/tljh/hub/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3088, in <module>
@_call_aside
File "/opt/tljh/hub/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3072, in _call_aside
f(*args, **kwargs)
File "/opt/tljh/hub/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3101, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/opt/tljh/hub/lib/python3.6/site-packages/pkg_resources/__init__.py", line 576, in _build_master
return cls._build_from_requirements(__requires__)
File "/opt/tljh/hub/lib/python3.6/site-packages/pkg_resources/__init__.py", line 589, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/opt/tljh/hub/lib/python3.6/site-packages/pkg_resources/__init__.py", line 783, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (chardet 4.0.0 (/opt/tljh/hub/lib/python3.6/site-packages), Requirement.parse('chardet<4.0,>=2.0'), {'aiohttp'})
How to reproduce
build using integration-tests/Dockerfile , try to run tljh-config
Your personal set up
Ubuntu 20.04 Docker version 19.03.14, build 5eb3275d40 docker-compose version 1.26.2, build eefe0d31
Also, as a tweak, I added a systemd oneshot to the docker which runs the tljh-install script on container up - if interested, can PR:
diff -urw the-littlest-jupyterhub/integration-tests/Dockerfile Dockerfile.tljh
--- the-littlest-jupyterhub/integration-tests/Dockerfile 2020-12-14 15:11:17.565877744 -0600
+++ Dockerfile.tljh 2020-12-17 18:55:16.663907039 -0600
@@ -1,6 +1,14 @@
# Systemd inside a Docker container, for CI only
+# via:
+#
+# https://tljh.jupyter.org/en/latest/contributing/dev-setup.html#contributing-dev-setup
+# https://github.com/jupyterhub/the-littlest-jupyterhub/blob/master/integration-tests/Dockerfile
+
FROM ubuntu:18.04
+ARG TLJH_ADMIN_USER=admin
+ARG TLJH_ADMIN_PASSWORD=admin
+
RUN apt-get update --yes
RUN apt-get install --yes systemd curl git sudo
@@ -16,7 +24,18 @@
RUN mkdir -p /etc/sudoers.d
-RUN systemctl set-default multi-user.target
+COPY ./tljh-install.service /etc/systemd/system/tljh-install.service
+
+# set default systemd target, enable tljh-install via symlink
+
+RUN systemctl set-default multi-user.target \
+ && ln -s /etc/systemd/system/tljh-install.service \
+ /etc/systemd/system/multi-user.target.wants/ \
+ && echo "TLJH_ADMIN_USER=${TLJH_ADMIN_USER}" > \
+ /etc/default/tljh-install \
+ && echo "TLJH_ADMIN_PASSWORD=${TLJH_ADMIN_PASSWORD}" >> \
+ /etc/default/tljh-install
+
STOPSIGNAL SIGRTMIN+3
and:
$ cat /dev/null tljh-install.service
[Unit]
Description=Install TLJH
[Service]
Type=oneshot
EnvironmentFile=/etc/default/tljh-install
ExecStart=/usr/bin/python3 /srv/src/bootstrap/bootstrap.py --admin ${TLJH_ADMIN_USER}:${TLJH_ADMIN_PASSWORD}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:11 (2 by maintainers)
Top GitHub Comments
@onwilliam First, activate the hub environment as per ixcat’s instruction at the top. I did this in the JupyterHub terminal.
. /opt/tljh/hub/bin/activate
Then try this command:
sudo -H pip uninstall chardet
I have the same issues, when i try to do
pip uninstall chardet
I get PermissionError: [Errno 13]. Any fix please?