Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing python 3.5 via apt-get [closed]

Tags:

python

I am attempting to install python 3.5 via apt-get I did the following

> sudo apt-get install python3.5
...
Unable to locate package python3.5

And the response says that it cant find python3.5. I tried doing apt-get update but that did not help as well

Any suggestions ? These are my details

PRETTY_NAME="Debian GNU/Linux 7 (wheezy)"
NAME="Debian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
ID=debian
ANSI_COLOR="1;31"

More update:

apt-cache policy python3 python
python3:
  Installed: (none)
  Candidate: 3.2.3-6
  Version table:
     3.2.3-6 0
        500 http://ftp.us.debian.org/debian/ wheezy/main armhf Packages
python:
  Installed: 2.7.3-4+deb7u1
  Candidate: 2.7.3-4+deb7u1
  Version table:
 *** 2.7.3-4+deb7u1 0
        500 http://ftp.us.debian.org/debian/ wheezy/main armhf Packages
        100 /var/lib/dpkg/status
like image 571
James Franco Avatar asked Jul 15 '16 09:07

James Franco


People also ask

How do I install Python 3.6 from terminal?

Install Python 3.6 in Ubuntu 14.04 and 16.04 By default, Ubuntu 14.04 and 16.04 ship in with Python 2.7 and Python 3.5. To install latest Python 3.6 version, you can use “deadsnakes” team PPA which contains more recent Python versions packaged for Ubuntu.


1 Answers

UPDATE

Thanks to Don Kirkby who highlight that there is a new recommended PPA.
The updated one is ppa:deadsnakes/ppa, so the complete command is the following:

sudo add-apt-repository ppa:deadsnakes/ppa


If you are using Ubuntu, you can install it adding a PPA; so you can proceed in this way:

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

If this procedure doesn't work, is possible that your Ubuntu version not supported it. So i think that you can install in this way:

sudo apt-get install libssl-dev openssl
wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
tar xzvf Python-3.5.0.tgz
cd Python-3.5.0
./configure
make
sudo make install
like image 192
Giordano Avatar answered Oct 12 '22 15:10

Giordano