Python 2.7 on Ubuntu

后端 未结 7 1143
攒了一身酷
攒了一身酷 2020-12-02 04:25

I am new to Python and am working on a Linux machine (Ubuntu 10.10). It is running python 2.6, but I\'d like to run 2.7 as it has features I want to use. I have been urged t

相关标签:
7条回答
  • 2020-12-02 04:50

    ubuntu 12.04

    Install dependencies:

    $ sudo apt-get install python-software-properties
    

    Add the repo:

    $ sudo add-apt-repository ppa:fkrull/deadsnakes
    

    Update the repo index:

    $ sudo apt-get update
    

    Install Python 3.3:

    $ sudo apt-get install python3.3
    

    ubuntu 12.04 > more

    Installing the dependencies:

    $ sudo apt-get install build-essential libsqlite3-dev sqlite3 bzip2 libbz2-dev
    

    Download and compile python:

    $ 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
    

    Some nice touches to install a py command by creating a symlink:

    $ mkdir ~/bin
    $ ln -s /opt/python3.3/bin/python ~/bin/py
    
    0 讨论(0)
提交回复
热议问题