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

EB/Setup Failing with syntax error #67

Closed
KALVS opened this issue Feb 5, 2021 · 3 comments
Closed

EB/Setup Failing with syntax error #67

KALVS opened this issue Feb 5, 2021 · 3 comments

Comments

@KALVS
Copy link

KALVS commented Feb 5, 2021

When installing the aws-cli the install python and pip step fails with the following output:

#!/bin/bash -eo pipefail
sudo apt-get -y -qq install python3.5-dev
sudo curl -O https://bootstrap.pypa.io/get-pip.py
sudo python3.5 get-pip.py
Selecting previously unselected package python3.5-dev.
Preparing to unpack .../python3.5-dev_3.5.3-1+deb9u3_amd64.deb ...
Unpacking python3.5-dev (3.5.3-1+deb9u3) ...
Setting up libpython3.5:amd64 (3.5.3-1+deb9u3) ...
Setting up libpython3.5-dev:amd64 (3.5.3-1+deb9u3) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Setting up python3.5-dev (3.5.3-1+deb9u3) ...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1883k 100 1883k 0 0 10.9M 0 --:--:-- --:--:-- --:--:-- 11.0M
Traceback (most recent call last):
File "get-pip.py", line 24226, in
main()
File "get-pip.py", line 199, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 82, in bootstrap
from pip._internal.cli.main import main as pip_entry_point
File "", line 969, in _find_and_load
File "", line 954, in _find_and_load_unlocked
File "", line 896, in _find_spec
File "", line 1147, in find_spec
File "", line 1123, in _get_spec
File "", line 1104, in _legacy_get_spec
File "", line 444, in spec_from_loader
File "", line 541, in spec_from_file_location
File "/tmp/tmp2wy4bcc7/pip.zip/pip/_internal/cli/main.py", line 60
sys.stderr.write(f"ERROR: {exc}")
^
SyntaxError: invalid syntax

Exited with code exit status 1
CircleCI received exit code 1

I think the problem is that 3.5 is no longer supported by PIP.

@dsayling
Copy link

@KALVS I'm not sure how you're installing pip, but these commands are not located in this orb.

If you are trying to install pip with an older version of python yourself, you should be able to by updating the URL for the get-pip script to https://bootstrap.pypa.io/3.5/get-pip.py

root@adf4218d02bb:/# cat etc/os-release 
NAME="Ubuntu"
VERSION="16.04.7 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.7 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
root@adf4218d02bb:/# python3.5 --version
Python 3.5.2
root@adf4218d02bb:/# curl -O https://bootstrap.pypa.io/get-pip.py
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1884k  100 1884k    0     0  2482k      0 --:--:-- --:--:-- --:--:-- 2486k
root@adf4218d02bb:/# python3.5 get-pip.py
Traceback (most recent call last):
  File "get-pip.py", line 24244, in <module>
    main()
  File "get-pip.py", line 199, in main
    bootstrap(tmpdir=tmpdir)
  File "get-pip.py", line 82, in bootstrap
    from pip._internal.cli.main import main as pip_entry_point
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 954, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 896, in _find_spec
  File "<frozen importlib._bootstrap_external>", line 1139, in find_spec
  File "<frozen importlib._bootstrap_external>", line 1115, in _get_spec
  File "<frozen importlib._bootstrap_external>", line 1096, in _legacy_get_spec
  File "<frozen importlib._bootstrap>", line 444, in spec_from_loader
  File "<frozen importlib._bootstrap_external>", line 533, in spec_from_file_location
  File "/tmp/tmp7_fe6qim/pip.zip/pip/_internal/cli/main.py", line 60
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax

Now use the 3.5 version

root@adf4218d02bb:/# curl -O https://bootstrap.pypa.io/3.5/get-pip.py
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1863k  100 1863k    0     0  3491k      0 --:--:-- --:--:-- --:--:-- 3489k
root@adf4218d02bb:/# python3.5 get-pip.py
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Collecting pip<21.0
  Downloading pip-20.3.4-py2.py3-none-any.whl (1.5 MB)
     |################################| 1.5 MB 2.0 MB/s 
Collecting setuptools
  Downloading setuptools-50.3.2-py3-none-any.whl (785 kB)
     |################################| 785 kB 8.2 MB/s 
Collecting wheel
  Downloading wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel, setuptools, pip
Successfully installed pip-20.3.4 setuptools-50.3.2 wheel-0.36.2

@KALVS
Copy link
Author

KALVS commented Feb 10, 2021 via email

@dsayling
Copy link

The issue was fixed in the EB orb v1.0.1, see CircleCI-Public/aws-elastic-beanstalk-orb#7
Be sure to update your circleci config with the latest version of that orb.

Since this is unrelated to this orb, I'm going to close this. If you have any other issues, please comment on the EB orb issue.

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

2 participants