0

I am trying to use Google Cloud Platform and to install an environment from a script. I did the following:

wget http://cs231n.github.io/assignments/2018/spring1718_assignment1.zip
unzip spring1718_assignment1.zip
cd assignment1
./setup_googlecloud.sh

Unfortunately, it ends with the error:

ERROR: Package 'aiocoap' requires a different Python: 2.7.17 not in '>=3.3'

I tried the proposition of update-alternatives in Change the Python3 default version in Ubuntu: the command python --version now successfully displays "Python 3.7.5", but I'm still getting the error when executing the script. Creating an alias doesn't work either, and relogging to the console doesn't help.

Additionnally to the error, I'm getting a warning, apparently displayed by the following Python source code (thank you grep):

if platform.python_implementation() == "CPython":
    message = (
        "Python 2.7 reached the end of its life on January "
        "1st, 2020. Please upgrade your Python as Python 2.7 "
        "is no longer maintained. "
    ) + message
deprecated(message, replacement=None, gone_in=None)

Why isn't update-alternatives working for me? How to make the script and 'aiocoap' installation work?

Codoscope
  • 101
  • 1
    The script you are running calls pip to install some packages. Perhaps your pip still points to a Python2 version? What does pip --version say? – TooTea Apr 22 '20 at 14:30
  • I didn't have pip installed, and I didn't know it was needed. I installed it and it fixed this issue. Thanks! – Codoscope Apr 22 '20 at 15:05

0 Answers0