install Python 3.3 on Ubuntu 12.04

Here is what I did to install Python 3.3 on Ubuntu 12.04:

  1. Install dependencies:

    sudo apt-get build-dep python3.2
    sudo apt-get install libreadline-dev libncurses5-dev libssl1.0.0 tk8.5-dev zlib1g-dev liblzma-dev
    
  2. Download Python 3.3.0:

    wget http://python.org/ftp/python/3.3.0/Python-3.3.0.tgz
    
  3. Extract:

    tar xvfz Python-3.3.0.tgz
    
  4. Configure and Install:

    cd Python-3.3.0
    ./configure --prefix=/opt/python3.3
    make  
    sudo make install
    
  5. Test if it worked:

    /opt/python3.3/bin/python3
    

You should see something similar:

Python 3.3.0 (default, Jan 31 2013, 18:37:42) 
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

Some Additional things that are useful... you can create a virtual environment in your home and just activate Python 3.3 on demand..

  1. Create a Virtual Environment in your home:

    /opt/python3.3/bin/pyvenv ~/py33
    
  2. Activate the virtualenv:

    source ~/py33/bin/activate
    
  3. Install distribute tools:

    wget http://python-distribute.org/distribute_setup.py
    python distribute_setup.py
    
  4. Install pip:

    easy_install pip
    
  5. Install any python packages you want (i.e. bottle)

    pip install bottle
    

Enjoy!

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值