简体   繁体   中英

Install Python 3.3 on Ubuntu

I am using Ubuntu 13.04. I am trying to learn Python and I want to learn the latest version that is Python 3.3. But whenever I type "python --version" in my terminal it shows "Python 2.7.4". I have tried to install Python 3.3 using these commands -

$ sudo apt-get install build-essential libsqlite3-dev sqlite3 bzip2 libbz2-dev
$ wget http://python.org/ftp/python/3.3.0/Python-3.3.0.tar.bz2

$ tar jxf ./Python-3.3.0.tar.bz2

$ cd ./Python-3.3.0

$ ./configure --prefix=/opt/python3.3

$ make && sudo make install

I believe I have been successful but it still shows "Python 2.7.4". Then I tried this other command

sudo apt-get install --reinstall python3.3 

But it still shows that I am using Python 2.7.4.

apt-get installs python 3 as python3 .

~$ python --version
Python 2.7.3
~$ python3 --version
Python 3.2.3

If you're on Ubuntu, then I'm pretty sure python3 already comes installed. You can type python and hit tab in Bash. Python 3 should come up, no need to go through configure, make, make install.

if you just want access to Python 3.3 (or any other version) you can download it at http://www.python.org/download/

I hope this helps, Jake Nixon

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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