如何将 Python 版本升级到 3.7? [英] How to upgrade Python version to 3.7?

查看:117
本文介绍了如何将 Python 版本升级到 3.7?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在 linux ubuntu 中安装了 python3.5.我已经下载了 python3.7.ta​​r www.python.org.

I have python3.5 already in linux ubuntu. I have downloaded the python3.7.tar www.python.org.

但是我不知道如何安装它.如何升级到python 3.7?谢谢.

But i have no idea how to install it. How to upgrade to python 3.7? Thanks.

推荐答案

如果你在使用 ubuntu,试试这个:

Try this if you are on ubuntu:

sudo apt-get update
sudo apt-get install build-essential libpq-dev libssl-dev openssl libffi-dev zlib1g-dev
sudo apt-get install python3-pip python3.7-dev
sudo apt-get install python3.7

如果您没有存储库,因此它触发了一个未找到的包,您首先必须安装它:

In case you don't have the repository and so it fires a not-found package you first have to install this:

sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update

更多信息:http://devopspy.com/python/install-python-3-6-ubuntu-lts/

这篇关于如何将 Python 版本升级到 3.7?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆