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 for Python 3.5 #83

Closed
JustAnotherArchivist opened this issue Jan 24, 2021 · 12 comments
Closed

get-pip.py for Python 3.5 #83

JustAnotherArchivist opened this issue Jan 24, 2021 · 12 comments

Comments

@JustAnotherArchivist
Copy link

Since yesterday's release of pip 21.0, get-pip.py no longer supports Python 3.5 due to using f-strings:

Traceback (most recent call last):
  File "get-pip.py", line 24226, 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/tmppehzzo9e/pip.zip/pip/_internal/cli/main.py", line 60
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax

Could a /3.5/get-pip.py be added, analogous to the 3.4 and older versions?

@greenmang0
Copy link

Yes, facing the same issue.

test-node01:~$ curl https://bootstrap.pypa.io/get-pip.py | python
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1883k  100 1883k    0     0  13.1M      0 --:--:-- --:--:-- --:--:-- 13.1M
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/tmpLEYzBo/pip.zip/pip/_internal/cli/main.py", line 60
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax

@pramodk
Copy link

pramodk commented Jan 24, 2021

Same issue here!

pramodk added a commit to neuronsimulator/nrn that referenced this issue Jan 24, 2021
  - with latest 20.1 release, get-pip.py not compatible with Python 3.5
  - see pypa/get-pip/issues/83 for details
  - use last working release 20.3.4
pramodk added a commit to neuronsimulator/nrn that referenced this issue Jan 24, 2021
* Fix pip bootstrapping with Python 3.5
  - with latest 20.1 release, get-pip.py not compatible with Python 3.5
  - see pypa/get-pip/issues/83 for details
  - use last working release 20.3.4
@Cappuccinuo
Copy link

Same issue here for python3.5

+ python3 /tmp/get-pip.py
Traceback (most recent call last):
  File "/tmp/get-pip.py", line 24226, in <module>
    main()
  File "/tmp/get-pip.py", line 199, in main
    bootstrap(tmpdir=tmpdir)
  File "/tmp/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 1147, in find_spec
  File "<frozen importlib._bootstrap_external>", line 1123, in _get_spec
  File "<frozen importlib._bootstrap_external>", line 1104, in _legacy_get_spec
  File "<frozen importlib._bootstrap>", line 444, in spec_from_loader
  File "<frozen importlib._bootstrap_external>", line 541, in spec_from_file_location
  File "/tmp/tmps00d7qag/pip.zip/pip/_internal/cli/main.py", line 60
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax

$ python3 --version
Python 3.5.3

Also for python2

$ python --version
Python 2.7.13
$ python /tmp/get-pip.py
Traceback (most recent call last):
  File "/tmp/get-pip.py", line 24226, in <module>
    main()
  File "/tmp/get-pip.py", line 199, in main
    bootstrap(tmpdir=tmpdir)
  File "/tmp/get-pip.py", line 82, in bootstrap
    from pip._internal.cli.main import main as pip_entry_point
  File "/tmp/tmpeSPv0D/pip.zip/pip/_internal/cli/main.py", line 60
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax

@pradyunsg
Copy link
Member

Ah, I'll add that in.

@pradyunsg
Copy link
Member

Filed #84 and python/psf-salt#199, which (when merged) should fix this. :)

@anetanel
Copy link

anetanel commented Jan 24, 2021

How long before this change is reflected in the download url 'https://bootstrap.pypa.io/get-pip.py'?
As of now, I still see the old file (23-Jan-2021 15:00), and our CI is broken because of it.

EDIT:
I understand now that for Python 3.5 I would need to download the file under the 3.5 directory. Still, it is not available at 'https://bootstrap.pypa.io/' yet. I would be glad to know how long it takes for it to update.

@okeren-cx
Copy link

@anetanel The site will update when this PR by @pradyunsg will be merged
In the meantime you can use 3.4 instead and see if that works, just point your CI to https://bootstrap.pypa.io/3.4/get-pip.py

@JustAnotherArchivist
Copy link
Author

https://bootstrap.pypa.io/3.5/get-pip.py is now available. Thanks, everyone!

@webknjaz
Copy link
Member

@kristoforerickson you should be using a different URL.

MattGal added a commit to dotnet/dotnet-buildtools-prereqs-docker that referenced this issue Jan 29, 2021
…ython 3.5.* in the base image, and until we have to, we won't force the update.
MattGal added a commit to dotnet/dotnet-buildtools-prereqs-docker that referenced this issue Jan 29, 2021
openstack-mirroring pushed a commit to openstack/diskimage-builder that referenced this issue Feb 3, 2021
The get-pip script does not work well with Python 2 and
it raise error during the installation [1].

[1] pypa/get-pip#83

Change-Id: I3755c34da313ef647547c6ae18b59cc04c2cdd60
@danielfm
Copy link

Just tried https://bootstrap.pypa.io/3.5/get-pip.py, but I'm getting HTTP 404.

Is this expected?

@JustAnotherArchivist
Copy link
Author

@danielfm Everything got moved around due to #61. The URL is now https://bootstrap.pypa.io/pip/3.5/get-pip.py.

fortinjose916 added a commit to fortinjose916/buildtools-prereqs-dotnet that referenced this issue Nov 11, 2022
…ython 3.5.* in the base image, and until we have to, we won't force the update.
fortinjose916 added a commit to fortinjose916/buildtools-prereqs-dotnet that referenced this issue Nov 11, 2022
@Souleymanebyte
Copy link

I'm trying to install montage packages on ubuntu last version but it's failing

SonicStark added a commit to SonicStark/aflgogogo that referenced this issue Sep 22, 2023
build.sh
 - Handle missing *sudo* for *apt-get*. Docker images often use root as default, but general linux distributions doesn't.
 - Jump over interactions when running *apt-get*.
 - Re-arrange prerequisites for LLVM. Python interpreter seems necessary for compiling LLVM even with test suite disabled, although the [documentation](https://releases.llvm.org/11.0.0/docs/GettingStarted.html#software) says opposite.
 - Re-write building clang toolchain:
    - To get a normal building, *llvm*, *clang* and *compiler-rt* are enough for LLVM source tree.
    - *libcxx* & *libcxxabi* with *msan* seems stray, so removed out.
 - Remove installing *python-bs4*. So weird it was!
 - Install *gawk* and *pkg-config*. They are frequently-used.
 - Do not upgrade *pip* after installed from APT, because latest pip drops support for some old python versions, such as pypa/get-pip#83.
 - Handle different versions of NetworkX:
    - aflgo#132 removed `nx.info()` due to deprecation, so *networkx<3.0* isn't necessary.
    - NetworkX doesn't always support all Python 3.x, which may cause compatibility issue with python installed from APT.
 - Find clang binaries by *which*, since sometimes they are installed into */usr/local/bin*.
 - Prompt user that the build is done.

Readme.md
 - Keep consistent with *build.sh*.
 - Tell readers about networkx version selection.

distance/distance_calculator/CMakeLists.txt
Use 3.4.3 instead of 3.10 for `cmake_minimum_required` because
 - Ver 3.10 is difficult to be satisfied for cmake installation from APT on old linux distributions.
 - Ver 3.4.3 is the minimum required for LLVM 11 (see https://releases.llvm.org/11.0.0/docs/CMake.html).
 - It still works well, tested on Ubuntu 16.04 LTS, 18.04 LTS and 20.04 LTS.
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

10 participants