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

get-pip.py: SyntaxError: invalid syntax (last week was OK now KO) #99

Closed
digitalfredy opened this issue Jan 27, 2021 · 4 comments
Closed

Comments

@digitalfredy
Copy link

To help us help you, please fill out as much of the following as you can. If a question is not relevant, feel free to skip it.

  1. What is your operating system and version?

    • Centos 7
  2. What is your Python version?

    • 2.7.5
  3. What version of pip do you have?

    • None
  4. If following an online tutorial or guide, please provide a link to the page or section giving you trouble:

  5. Could you describe your issue in as much detail as possible?

During the last month I was using Vagrant with Ansible-local provider to do some automated test and all was working without issues but today I did a vagrant destroy and them a vagrant up and the my new VM not be provisioned. It means can not install Ansible because can not install pip because it looks you did a change that introduces a bug in get-pip-py (it looks other people got same problem for python 3):

curl https://bootstrap.pypa.io/get-pip.py | sudo python

Stdout from the command:



Stderr from the command:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1883k  100 1883k    0     0   894k      0  0:00:02  0:00:02 --:--:--  895k
Traceback (most recent call last):
  File "<stdin>", line 24226, in <module>
  File "<stdin>", line 199, in main
  File "<stdin>", line 82, in bootstrap
  File "/tmp/tmpL73OKo/pip.zip/pip/_internal/cli/main.py", line 60
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax

When searching in duckduckgo I found that another person got same problem today but for Python 3.5: https://unix.stackexchange.com/questions/631244/why-does-get-pip-py-complain-about-invalid-syntax

@digitalfredy
Copy link
Author

This is the Vagrantfile (just in case):

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"
  config.vm.box_check_update = false
  # Hostname to be used by Ansible and namespace for libvirt domain
  config.vm.define "hdp-sandbox"
  config.vm.synced_folder ".", "/vagrant", type: "nfs"
  config.vm.provider :libvirt do |domain|
    domain.memory = 13000
    domain.cpus = 2
  end

  # 00 Get Ansible
  config.vm.provision "ansible_local" do |ansible|
    ansible.install_mode = "pip"
    ansible.version = "2.9.15"
    ansible.playbook = "playbook.yml"
  end

### more deployment code I removed because is not related

@xavfernandez
Copy link
Member

Hello, cf #82 (and #83 for Python 3.5).

@di di transferred this issue from pypa/packaging-problems Feb 6, 2021
@pradyunsg
Copy link
Member

curl https://bootstrap.pypa.io/get-pip.py | sudo python

Change this to:

curl https://bootstrap.pypa.io/2.7/get-pip.py | sudo python

@paulocob

This comment was marked as resolved.

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

No branches or pull requests

4 participants