【发布时间】:2020-10-15 20:59:47
【问题描述】:
如何在 AWS EC2 ubuntu 实例中将我的 python3 版本从 3.5.2 升级到 3.7?
我在尝试使用命令 python3 manage.py runserver 运行服务器时遇到 ImportError: No module named 'secrets' 错误。我在某处读到,python3 3.5 版不支持秘密,它仅适用于更高版本。我的 python 版本是 3.5.2。我要升级版本。
我试过 sudo apt-get install python3.7,但它不起作用:
Building dependency tree Reading state information... Done
E: Unable to locate package python3.7
E: Couldn't find any package by glob 'python3.7'
E: Couldn't find any package by regex 'python3.7'
然后我尝试了 sudo update-alternatives --config python3,这也不起作用
update-alternatives: error: no alternatives for python3
【问题讨论】:
标签: python python-3.x amazon-web-services