Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add envvar to allow upgrading pip before installing default-python-packages #179

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dadastoor
Copy link

Feature

Upgrade pip before running pip install for default-python-packages

$ cat ~/.default-python-packages
ansible

Problem:

$ asdf install python 3.6.15
# ...
# Python 3.6.15 install goes here
# ...
# some other pip packages collected first
# ...
Collecting ansible-core~=2.16.0 (from ansible->-r /home/ddastoor/.default-python-packages (line 4))
Could not find a version that satisfies the requirement ansible-core~=2.16.0 (from ansible->-r /home/ddastoor/.default-python-packages (line 4)) (from versions: 0.0.1a1, 2.11.0b1, 2.11.0b2, 2.11.0b3, 2.11.0b4, 2.11.0rc1, 2.11.0rc2, 2.11.0, 2.11.1rc1, 2.11.1, 2.11.2rc1, 2.11.2, 2.11.3rc1, 2.11.3, 2.11.4rc1, 2.11.4, 2.11.5rc1, 2.11.5, 2.11.6rc1, 2.11.6, 2.11.7rc1, 2.11.7, 2.11.8rc1, 2.11.8, 2.11.9rc1, 2.11.9, 2.11.10rc1, 2.11.10, 2.11.11rc1, 2.11.11, 2.11.12rc1, 2.11.12)
No matching distribution found for ansible-core~=2.16.0 (from ansible->-r /home/ddastoor/.default-python-packages (line 4))
You are using pip version 18.1, however version 21.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Solution:

$ asdf install python 3.6.15
# ...
# Python 3.6.15 install goes here
# ...
Installed Python-3.6.15 to /home/ddastoor/.asdf/installs/python/3.6.15
pip install --upgrade pip
Collecting pip
Using cached https://files.pythonhosted.org/packages/a4/6d/6463d49a933f547439d6b5b98b46af8742cc03ae83543e4d7688c2420f8b/pip-21.3.1-py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 18.1
Uninstalling pip-18.1:
Successfully uninstalled pip-18.1
Successfully installed pip-21.3.1
# ...
# some other pip packages collected first
# ...
Collecting ansible-core~=2.11.7
Using cached ansible-core-2.11.12.tar.gz (7.1 MB)
Preparing metadata (setup.py) ... done

@dadastoor dadastoor requested a review from a team as a code owner January 18, 2024 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant