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

During provision: "Package 'setuptools' requires a different Python: 2.7.12 not in '>=3.5" #2

Open
domis86 opened this issue Jan 19, 2020 · 0 comments

Comments

@domis86
Copy link

domis86 commented Jan 19, 2020

When you start a new vagrant and provision it will break with following message:

    my-vm: failed: [localhost] (item=[u'yq']) => {"ansible_loop_var": "item", "changed": false, "cmd": ["/usr/local/bin/pip2", "install", "yq"], "item": ["yq"], "msg": "stdout: Collecting yq\n  Downloading https://files.pythonhosted.org/packages/c3/68/8994d78dcbb92cbfb70800bb6873f2694705516f4ae14ff08c05111fefeb/yq-2.10.0-py2.py3-none-any.whl\nRequirement already satisfied: PyYAML>=3.11 in /usr/lib/python2.7/dist-packages (from yq) (3.11)\nRequirement already satisfied: setuptools in /usr/local/lib/python2.7/dist-packages (from yq) (45.1.0)\n\n:stderr: DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support\nERROR: Package 'setuptools' requires a different Python: 2.7.12 not in '>=3.5'\n"}

It will happen on first vagrant provision when you install additional python tools ("tools_extra_python") - or during second provision on "Upgrade setuptools" task.

https://github.com/iroquoisorg/ansible-role-tools/blob/master/tasks/main.yml#L34

- name: Upgrade setuptools
  pip:
    name: setuptools
    state: latest

For temporary workaround i just commented out "Upgrade setuptools" task - but maybe there is better solution.

This may give some more info about this problem: pypa/setuptools#1458 (comment)

Edit:
alternative solution:

- name: Upgrade setuptools
  pip:
    name: setuptools
    state: present
    version: "44"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant