简体   繁体   English

ubuntu安装python 3.5

[英]ubuntu install python 3.5

How can I easily install python 3.5 on ubuntu? 如何在ubuntu上轻松安装python 3.5? In this article https://askubuntu.com/questions/682869/install-python-3-5-on-vivid-using-apt-get write what im must run next comand 在本文https://askubuntu.com/questions/682869/install-python-3-5-on-vivid-using-apt-get中写出im必须在下一个命令中运行

sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python3.5

But im run 但是我跑

  sudo add-apt-repository ppa:fkrull/deadsnakes

and its output next error 及其输出下一个错误

unable to execute /usr/bin/add-apt-repository: No such file or directory

It comes by default when you run the current release : 运行当前版本时默认情况下:

edd@max:~$ python --version
Python 2.7.11+
edd@max:~$ python3.5 --version
Python 3.5.1+
edd@max:~$

So available but not yet the default python engine. 目前可用,但尚未提供默认的python引擎。 That is using 那是在用

edd@max:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04 LTS
Release:        16.04
Codename:       xenial
edd@max:~$ 

Is software-properties-common installed? 是否已安装software-properties-common? You can check by running apt-cache search software-properties-common On my 14.04 it shows: 您可以通过在我的14.04上运行apt-cache search software-properties-common进行检查,它显示:

$ apt-cache policy software-properties-common 
software-properties-common:
  Installed: 0.92.37.7
  Candidate: 0.92.37.7
  Version table:
 *** 0.92.37.7 0
        500 http://gb.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     0.92.36 0
        500 http://gb.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

If it isn't installed then try installing it using apt. 如果尚未安装,请尝试使用apt安装它。 I'm not sure why it wouldn't be installed though as it seems to be fairly core. 我不确定为什么它不会被安装,因为它似乎是相当核心的。

Also make sure that the directory /etc/apt/sources.list.d exists on your system. 还要确保系统上存在目录/etc/apt/sources.list.d。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM