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?
pip
to install some packages. Perhaps yourpip
still points to a Python2 version? What doespip --version
say? – TooTea Apr 22 '20 at 14:30