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

Implement community fix for Ubuntu 16.04 Xenial python provisioning #5

Closed

Conversation

mpescetto
Copy link

For issue: #4

@mpescetto
Copy link
Author

Will need to troubleshoot pip3 installation error. Saying required version is python 3.5:
https://travis-ci.com/github/enova/enova-python/jobs/338880399#L819-L922

@ju2wheels
Copy link

https://stackoverflow.com/questions/60438720/how-to-install-additional-pip-for-python3-4

pip has dropped support for python 3.4 starting with version 19.0. You can try specifying the version of pip you wish to install using sudo python3.4 get-pip.py pip==18.1

So likely need to add a version conditional somewhere to pin it to a max of 18.1 by overriding the get-pip URL for that case, IIRC it already allows you to override that somehow.

@ju2wheels
Copy link

ju2wheels commented May 29, 2020

jlajara@transformer:~$ pyenv which pip
/home/jlajara/.pyenv/versions/venv-enova-python-3.4/bin/pip
jlajara@transformer:~$ pip --version
pip 6.0.8 from /home/jlajara/.pyenv/versions/3.4.3/envs/venv-enova-python-3.4/lib/python3.4/site-packages (python 3.4)
jlajara@transformer:~$ pip install pip==19
You are using pip version 6.0.8, however version 20.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting pip==19
  Downloading https://files.pythonhosted.org/packages/60/64/73b729587b6b0d13e690a7c3acd2231ee561e8dd28a58ae1b0409a5a2b20/pip-19.0-py2.py3-none-any.whl (1.4MB)
    100% |################################| 1.4MB 465kB/s 
Installing collected packages: pip
  Found existing installation: pip 6.0.8
    Uninstalling pip-6.0.8:
      Successfully uninstalled pip-6.0.8

Successfully installed pip-19.0
jlajara@transformer:~$ pip --version
pip 19.0 from /home/jlajara/.pyenv/versions/3.4.3/envs/venv-enova-python-3.4/lib/python3.4/site-packages/pip (python 3.4)
jlajara@transformer:~$ pip install -U pip
DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).
Collecting pip
  Downloading https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl (1.4MB)
    100% |████████████████████████████████| 1.4MB 19.4MB/s 
Installing collected packages: pip
  Found existing installation: pip 19.0
    Uninstalling pip-19.0:
      Successfully uninstalled pip-19.0
Successfully installed pip-19.1.1
jlajara@transformer:~$ pip install pip==20.1.1
DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).
Collecting pip==20.1.1
  ERROR: Could not find a version that satisfies the requirement pip==20.1.1 (from versions: 0.2, 0.2.1, 0.3, 0.3.1, 0.4, 0.5, 0.5.1, 0.6, 0.6.1, 0.6.2, 0.6.3, 0.7, 0.7.1, 0.7.2, 0.8, 0.8.1, 0.8.2, 0.8.3, 1.0, 1.0.1, 1.0.2, 1.1, 1.2, 1.2.1, 1.3, 1.3.1, 1.4, 1.4.1, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 6.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4, 6.0.5, 6.0.6, 6.0.7, 6.0.8, 6.1.0, 6.1.1, 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.1.0, 7.1.1, 7.1.2, 8.0.0, 8.0.1, 8.0.2, 8.0.3, 8.1.0, 8.1.1, 8.1.2, 9.0.0, 9.0.1, 9.0.2, 9.0.3, 10.0.0b1, 10.0.0b2, 10.0.0, 10.0.1, 18.0, 18.1, 19.0, 19.0.1, 19.0.2, 19.0.3, 19.1, 19.1.1)
ERROR: No matching distribution found for pip==20.1.1
jlajara@transformer:~$ pip install -U pip==19.2
DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).
Collecting pip==19.2
  ERROR: Could not find a version that satisfies the requirement pip==19.2 (from versions: 0.2, 0.2.1, 0.3, 0.3.1, 0.4, 0.5, 0.5.1, 0.6, 0.6.1, 0.6.2, 0.6.3, 0.7, 0.7.1, 0.7.2, 0.8, 0.8.1, 0.8.2, 0.8.3, 1.0, 1.0.1, 1.0.2, 1.1, 1.2, 1.2.1, 1.3, 1.3.1, 1.4, 1.4.1, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 6.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4, 6.0.5, 6.0.6, 6.0.7, 6.0.8, 6.1.0, 6.1.1, 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.1.0, 7.1.1, 7.1.2, 8.0.0, 8.0.1, 8.0.2, 8.0.3, 8.1.0, 8.1.1, 8.1.2, 9.0.0, 9.0.1, 9.0.2, 9.0.3, 10.0.0b1, 10.0.0b2, 10.0.0, 10.0.1, 18.0, 18.1, 19.0, 19.0.1, 19.0.2, 19.0.3, 19.1, 19.1.1)
ERROR: No matching distribution found for pip==19.2

Ok so the latest version of pip supported for python 3.4 is 19.1.1 so the one pinned should work but the question is why its resorting to using the URL. I dont know how to run kitchen locally so its hard to trace what its doing without the Chef debug output being enabled.

For a first try, try changing the pip_version values in .kitchen.yml and .kitchen.travis.yml to "19.0" and "18.0" (as forced strings) in case it wants exact match instead of 19 and 18. If that doesnt work then ill need to figure how to run kitchen so I can enable Chef debug logging.

@ju2wheels
Copy link

ju2wheels commented May 29, 2020

Shouldnt the versions in metadata.rb and the poise_python version.rb be the same as well or is that being tracked differently because one is the library and the other is the Chef cookbook?

@ju2wheels
Copy link

I pushed another fix for the hack script as 1.8.12 on our fork. I have manually tested this version of the hack script against all pip versions from 8.1.1 to 20.3.3 using Python 2.7 to address a few more bugs on pip 19.3.x and higher.

@mpescetto mpescetto closed this Jun 30, 2021
@mpescetto mpescetto deleted the fix_xenial_python_provisioning branch June 30, 2021 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants