Installing Python 2.7 on Ubuntu 10.04
来源:互联网 发布:定时开关机软件 编辑:程序博客网 时间:2024/05/17 18:43
Installing Python 2.7 on Ubuntu
October 10th, 2011 at 8:48 pmThis week I upgraded the main installation of Python on my Ubuntu 10.04 machines to version 2.7. Here’s a short documentation of this process.
Step 1: Prerequisites
The first step in Python’s installation is running a configure script which snoops around your system, looking for packages that it needs to build various capabilities and extensions with. Having these packages installed before runningconfigure makes sure it finds them.
Here are some packages that have to be installed to have various aspects of Python functioning:
sudo apt-get install libreadline-devsudo apt-get install libsqlite3-devsudo apt-get install libbz2-devsudo apt-get install libssl-dev
Step 2: Download and build Python
Go to http://www.python.org/. In the "Quick links" section on the left-hand side of the page, "Source distribution" is a direct link to the tarball. Download it. Unzip the tarball, and from the root of the created directory (which will be calledPython-2.7.2 or something similar, depending on the version):
./configuremake -j
I found that the default configure settings work fine for Ubuntu 10.04 and there’s no real need to specify extra--with flags.
You can now check that Python was correctly built by executing ./python and falling into its interactive terminal. If you want, you can also execute the Python test-suite withmake test, though it may take a long time to run (~10 minutes on a relatively fast machine).
Step 3: Install
In the same directory, run:
sudo make install
This installs Python into /usr/local/bin. Depending on the configuration of your system, you may want to add symlinks to the newly created/usr/local/bin/python2.7 in/usr/bin/ as well.
That’s it, you now have Python 2.7 installed.
Step 4: Install some essential first modules
Python has a powerful packaging & installation machinery for its modules, but it doesn’t come pre-installed with Python itself.
So it’s a good idea to install setuptools (or distribute), followed by pip.
From now, pip can be used to install other Python modules very conveniently. For example, all you need to have theIPython shell installed is:
sudo pip install ipythonwget http:
//python-distribute
.org
/distribute_setup
.py
sudo
python distribute_setup.py
wget https:
//github
.com
/pypa/pip/raw/master/contrib/get-pip
.py
sudo
python get-pip.py
- Installing Python 2.7 on Ubuntu 10.04
- Installing Python 2.7 on Ubuntu
- Installing Python 2.7.5 on Ubuntu
- Installing Nemesis on Ubuntu 10.04
- Installing Python 2.6 on Ubuntu 8.04
- Installing MapServer on Ubuntu
- installing chkconfig on ubuntu
- Installing Jenkins on Ubuntu
- Installing Selenium and PhantomJS for Python 3 on Ubuntu 14.04
- Installing vsftp on ubuntu 8.04
- Installing Aptana on Ubuntu 8.04
- Installing Tomcat 6 on Ubuntu
- Installing Plone 4 on Ubuntu
- Installing Cuda on Ubuntu 11.10
- Installing PostGIS 2.0 on ubuntu
- Installing webrtc2sip on Ubuntu 12.04
- Installing OrangeHRM On Ubuntu 12.04
- Installing Java 7 on Ubuntu
- container_of() 作用:实现通过结构中的某个变量获取结构本身的指针
- QT定时器的实现 ,多种定时器的使用
- C语言单元测试
- linux 开发调试常用工具总结
- 虚拟机 找不到 虚拟网卡
- Installing Python 2.7 on Ubuntu 10.04
- (step6.1.4)hdu 1102(Constructing Roads——最小生成树)
- 数据挖掘笔记(1)——概论、类型
- KMP算法
- IOS越狱开发起步教程
- ORA-16047: DGID mismatch between destination setting and target database
- 数据挖掘笔记(2)——分类、数值预测
- 调整 VirtualBox 虚拟机的磁盘大小
- 给apache安装mod_rewrite模块