Installing Python 3.5.2 from source

Here are the procedures we are to follow,

  1. Download the source code of an official Python release.
  2. Configure the build appropriately for our machine.
  3. Compile the software.
  4. Test the software to make sure it works properly.
  5. Install the software.
  6. Configure our system to make sure we can use the software easily.

Getting a Python release

Go to the Python source downloads and choose a version to download (I’ll use 3.5.2 throughout this document but the process should be similar for any other version).

You can extract a tar archive file using the following command:

tar xf Python-3.5.1.tgz

tar’s argument handling is ancient and unlike almost all other UNIX programs so you probably needn’t bother learning how the work; just remember tar xf means “extract from a file”. Like most UNIX programs, tar will not produce any output unless it encounters an error or you specifically ask it to. If you’d like it to give you some feedback as it works use tar xvf instead (“extract verbosely from a file”).

You should now have a directory called Python-3.5.1/ which contains the release files. From now on I’ll assume we’re working inside this new directory:

cd Python-3.5.1/

Building Python

Most UNIX software uses a very similar build process:

  • first you configure the build with the install location, where to find any libraries it needs, etc.
  • then you compile the software
  • then you test the software
  • then you install the software

Each step is usually a single command and the whole process usually looks a little like this:

./configure
make
make test
sudo make install

Reference: https://passingcuriosity.com/2015/installing-python-from-source/

时间: 2024-08-07 12:28:57

Installing Python 3.5.2 from source的相关文章

[转]Installing python 2.7 on centos 6.3. Follow this sequence exactly for centos machine only

Okay for centos 6.4 also On apu.0xdata.loc, after this install was done $ which python /usr/local/bin/python $ python -V Python 2.7.3 $ ls -ltr /usr/local/bin/pyth* lrwxrwxrwx 1 root root 24 Jan 30 2013 /usr/local/bin/python -> /usr/local/bin/python2

Python thread start (C source code)

Python源码剖析中针对进程的封装: static PyMethodDef thread_methods[] = { {"start_new_thread", (PyCFunction)thread_PyThread_start_new_thread, METH_VARARGS, start_new_doc}, {"start_new", (PyCFunction)thread_PyThread_start_new_thread, METH_VARARGS, st

error: Microsoft Visual C++ 14.0 is required when installing python package

Binary install it the simple way!I can't believe no one has suggested this already - use the binary-only option for pip. For example, for mysqlclient: pip install --only-binary :all: mysqlclientMany packages don't create a build for every single rele

Python著名的lib和开发框架(均为转载)

第一,https://github.com/vinta/awesome-python Awesome Python A curated list of awesome Python frameworks, libraries, software and resources. Inspired by awesome-php. Awesome Python Admin Panels Algorithms and Design Patterns Anti-spam Asset Management A

Building Python 2.7.10 with Visual Studio 2010 or 2015 - Google Chrome

您的浏览器(Chrome 33) 需要更新.该浏览器有诸多安全漏洞,无法显示本网站的所有功能.?了解如何更新浏览器 × p-nand-q.com C++? Python? Programming? Languages? Humor? Tools? Misc? Building Python 2.7.10 with Visual Studio 2010 or 2015 7th revision, August 7, 2015.A document history can be found at t

CentOS6.7安装python的virtualenv环境

安装virtualenv,可以虚拟多个python版本的环境 1.安装epel源 [[email protected] ~]# yum install epel-release -y 2.安装python-virtualenv [[email protected] ~]# yum install python-virtualenv -y 3.创建virtualenv环境 [[email protected] ~]# mkdir ~/.virtualenv [[email protected] .

Python学习笔记(四十三)virtualenv (创建一套“隔离”的Python运行环境)

摘抄自:https://www.liaoxuefeng.com/wiki/0014316089557264a6b348958f449949df42a6d3a2e542c000/001432712108300322c61f256c74803b43bfd65c6f8d0d0000 在开发Python应用程序的时候,系统安装的Python3只有一个版本:3.4.所有第三方的包都会被pip安装到Python3的site-packages目录下.(Linux) 如果我们要同时开发多个应用程序,那这些应用程

Installing scikit-learn

Installing scikit-learn http://scikit-learn.org/stable/install.html Installing scikit-learn There are different ways to get scikit-learn installed: Install the version of scikit-learn provided by your operating system or Python distribution. This is

Python教程大纲

缘起:最近想在部门推Python语言,写这个blog主要就是个教程大纲,之前先列出一些资源:Python历史:http://www.docin.com/p-53019548.html                   :http://blog.csdn.net/zhchongyao/article/details/7748668 Python中文社区主站入口:http://woodpecker.org.cn/Python简明教程:http://woodpecker.org.cn/abyteof