You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Focal includes a newer version of pip than we're bundling (20.0.2 vs 18.1) and the bootstrap logic ends up downgrading it in the venv. This is succeeds during the install hook, but on the first upgrade-charm hook it fails with:
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-flannel-0/.venv/bin/pip", line 5, in <module>from pip._internal import main
File "/var/lib/juju/agents/unit-flannel-0/.venv/lib/python3.8/site-packages/pip/_internal/__init__.py", line 40, in <module>from pip._internal.cli.autocompletion import autocomplete
File "/var/lib/juju/agents/unit-flannel-0/.venv/lib/python3.8/site-packages/pip/_internal/cli/autocompletion.py", line 8, in <module>from pip._internal.cli.main_parser import create_main_parser
File "/var/lib/juju/agents/unit-flannel-0/.venv/lib/python3.8/site-packages/pip/_internal/cli/main_parser.py", line 12, in <module>from pip._internal.commands import (
File "/var/lib/juju/agents/unit-flannel-0/.venv/lib/python3.8/site-packages/pip/_internal/commands/__init__.py", line 6, in <module>from pip._internal.commands.completion import CompletionCommand
File "/var/lib/juju/agents/unit-flannel-0/.venv/lib/python3.8/site-packages/pip/_internal/commands/completion.py", line 6, in <module>from pip._internal.cli.base_command import Command
File "/var/lib/juju/agents/unit-flannel-0/.venv/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 23, in <module>from pip._internal.index import PackageFinder
ImportError: cannot import name 'PackageFinder' from 'pip._internal.index' (/var/lib/juju/agents/unit-flannel-0/.venv/lib/python3.8/site-packages/pip/_internal/index/__init__.py)
Since the bundled pip (and setuptools) was there to work around an upstream pip bug due to bionic and below bundling pip < 10, we should just ignore the bundled pip when deploying on focal and above.
The text was updated successfully, but these errors were encountered:
Focal provides a newer version of pip (and setuptools) than what is
bundled, and downgrading it in the venv leads to it being broken. This
doesn't show until after the first bootstrap, so on the first
upgrade-charm hook. This skips installing pip and setuptools if pip is
already at a newer version in the venv.
Fixes#159
Focal includes a newer version of pip than we're bundling (20.0.2 vs 18.1) and the bootstrap logic ends up downgrading it in the venv. This is succeeds during the
install
hook, but on the firstupgrade-charm
hook it fails with:Since the bundled pip (and setuptools) was there to work around an upstream pip bug due to bionic and below bundling pip < 10, we should just ignore the bundled pip when deploying on focal and above.
The text was updated successfully, but these errors were encountered: