root/docs/bobchin/diveintopython/installing_python/source.html @ 26131

Revision 26131, 8.3 kB (checked in by drry, 4 years ago)
  • added subversion properties.
  • Property svn:mime-type set to text/html
Line 
1
2<!DOCTYPE html
3  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
4<html>
5   <head>
6<!--Translated using CatsCradle 3.5 [SourceID:source~MmPJRznhY.html] //-->
7      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
8   
9      <title>1.7.&nbsp;ソースからPython
10 をインストールする</title>
11      <link rel="stylesheet" href="../diveintopython.css" type="text/css">
12      <link rev="made" href="mailto:f8dy@diveintopython.org">
13      <meta name="generator" content="DocBook XSL Stylesheets V1.52.2">
14      <meta name="keywords" content="Python, Dive Into Python, tutorial, object-oriented, programming, documentation, book, free">
15      <meta name="description" content="Python from novice to pro">
16      <link rel="home" href="../toc/index.html" title="Dive Into Python">
17      <link rel="up" href="index.html" title="Chapter&nbsp;1.&nbsp;Installing Python">
18      <link rel="previous" href="debian.html" title="1.6.&nbsp;Python on Debian GNU/Linux">
19      <link rel="next" href="shell.html" title="1.8.&nbsp;The Interactive Shell">
20   </head>
21   <body>
22      <table id="Header" width="100%" border="0" cellpadding="0" cellspacing="0" summary="">
23         <tr>
24            <td id="breadcrumb" colspan="5" align="left" valign="top">You
25 are here: <a href="../index.html">Home</a>&nbsp;>&nbsp;<a href="../toc/index.html">Dive
26 Into Python</a>&nbsp;>&nbsp;<a href="index.html">Installing
27 Python</a>&nbsp;>&nbsp;<span class="thispage">Python
28 Installation from Source</span></td>
29            <td id="navigation" align="right" valign="top">&nbsp;&nbsp;&nbsp;<a href="debian.html" title="Prev: “Python on Debian GNU/Linux&#8221;"><<</a>&nbsp;&nbsp;&nbsp;<a href="shell.html" title="Next: “The Interactive Shell&#8221;">>></a></td>
30         </tr>
31         <tr>
32            <td colspan="3" id="logocontainer">
33               <h1 id="logo"><a href="../index.html" accesskey="1">Dive
34 Into Python</a></h1>
35               <p id="tagline">Python
36 from novice to pro</p>
37            </td>
38            <td colspan="3" align="right">
39               <form id="search" method="GET" action="http://www.google.com/custom">
40                  <p><label for="q" accesskey="4">Find:&nbsp;</label><input type="text" id="q" name="q" size="20" maxlength="255" value=" "> <input type="submit" value="Search"><input type="hidden" name="cof" value="LW:752;L:http://diveintopython.org/images/diveintopython.png;LH:42;AH:left;GL:0;AWFID:3ced2bb1f7f1b212;"><input type="hidden" name="domains" value="diveintopython.org"><input type="hidden" name="sitesearch" value="diveintopython.org"></p>
41               </form>
42            </td>
43         </tr>
44      </table>
45      <div id="sponsoredlinks">
46<script type="text/javascript"><!--
47google_ad_client = "pub-7176621954566026";
48google_ad_width = 120;
49google_ad_height = 600;
50google_ad_format = "120x600_as";
51google_color_border = "800000";
52google_color_bg = "FFFFFF";
53google_color_link = "800000";
54google_color_url = "008000";
55google_color_text = "000000";
56google_ad_channel ="1280308639";
57//--></script>
58<script type="text/javascript"
59  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
60</script>
61</div>
62
63      <div class="section" lang="en">
64         <div class="titlepage">
65            <div>
66               <div>
67                  <h2 class="title"><a name="install.source"></a>1.7.&nbsp;<span class="application">ソースからPython
68 をインストールする</span> 
69                   </h2>
70               </div>
71            </div>
72            <div></div>
73         </div>
74         <div class="abstract">
75            <p>ソースから構築するのがお好きであれば、以下から <span class="application">Python</span> のソースコードをダウンロードできます。 <a href="http://www.python.org/ftp/python/">http://www.python.org/ftp/python/</a>最新バージョンを選択し、 <tt class="filename">.tgz</tt> ファイルをダウンロードします。次に通常は <b class="userinput"><tt>configure</tt></b>, <b class="userinput"><tt>make</tt></b>, <b class="userinput"><tt>make
76 install</tt></b> と入力します。
77             </p>
78         </div>
79         <div class="example"><a name="d0e3716"></a><h3 class="title">Example&nbsp;1.4.&nbsp;ソースからのインストール</h3><pre class="screen">
80<tt class="prompt"> localhost:~$</tt><span class="userinput">su -</span>
81<tt class="prompt"> Password:</tt><span class="userinput">[enter your root password]</span>
82<tt class="prompt"> localhost:~#</tt><span class="userinput">wget http://www.python.org/ftp/python/2.3/Python-2.3.tgz</span>
83<span class="computeroutput">Resolving www.python.org... done.
84Connecting to www.python.org[194.109.137.226]:80... connected.
85HTTP request sent, awaiting response... 200 OK
86Length: 8,436,880 [application/x-tar]
87...</span>
88<tt class="prompt"> localhost:~#</tt><span class="userinput">tar xfz Python-2.3.tgz</span>
89<tt class="prompt"> localhost:~#</tt><span class="userinput">cd Python-2.3</span>
90<tt class="prompt"> localhost:~/Python-2.3#</tt><span class="userinput">./configure</span>
91<span class="computeroutput">checking MACHDEP... linux2
92checking EXTRAPLATDIR...
93checking for --without-gcc... no
94...</span>
95<tt class="prompt"> localhost:~/Python-2.3#</tt><span class="userinput">make</span>
96<span class="computeroutput">gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
97-I. -I./Include -DPy_BUILD_CORE -o Modules/python.o Modules/python.c
98gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
99-I. -I./Include -DPy_BUILD_CORE -o Parser/acceler.o Parser/acceler.c
100gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
101-I. -I./Include -DPy_BUILD_CORE -o Parser/grammar1.o Parser/grammar1.c
102...</span>
103<tt class="prompt"> localhost:~/Python-2.3#</tt><span class="userinput">make install</span>
104<span class="computeroutput">/usr/bin/install -c python /usr/local/bin/python2.3
105...</span>
106<tt class="prompt"> localhost:~/Python-2.3#</tt><span class="userinput">exit</span>
107<span class="computeroutput">logout</span>
108<tt class="prompt"> localhost:~$</tt><span class="userinput">which python</span>
109<span class="computeroutput">/usr/local/bin/python</span>
110<tt class="prompt"> localhost:~$</tt><span class="userinput">python</span>
111<span class="computeroutput">Python 2.3.1 (#2, Sep 24 2003, 11:39:14)
112[GCC 3.3.2 20030908 (Debian prerelease)] on linux2
113Type "help", "copyright", "credits" or "license" for more information.</span>
114<tt class="prompt"> >>></tt><span class="userinput">[press Ctrl+D to get back to the command prompt]</span>
115<tt class="prompt"> localhost:~$</tt>
116</pre></div>
117      </div>
118      <table class="Footer" width="100%" border="0" cellpadding="0" cellspacing="0" summary="">
119         <tr>
120            <td width="35%" align="left"><br><a class="NavigationArrow" href="debian.html"><<&nbsp;Python
121 on Debian GNU/Linux</a></td>
122            <td width="30%" align="center"><br>&nbsp;<span class="divider">|</span>&nbsp;<a href="index.html#install.choosing" title="1.1.&nbsp;Which Python is right for you?">1</a> <span class="divider">|</span> <a href="windows.html" title="1.2.&nbsp;Python on Windows">2</a> <span class="divider">|</span> <a href="macosx.html" title="1.3.&nbsp;Python on Mac OS X">3</a> <span class="divider">|</span> <a href="macos9.html" title="1.4.&nbsp;Python on Mac OS 9">4</a> <span class="divider">|</span> <a href="redhat.html" title="1.5.&nbsp;Python on RedHat Linux">5</a> <span class="divider">|</span> <a href="debian.html" title="1.6.&nbsp;Python on Debian GNU/Linux">6</a> <span class="divider">|</span> <span class="thispage">7</span> <span class="divider">|</span> <a href="shell.html" title="1.8.&nbsp;The Interactive Shell">8</a> <span class="divider">|</span> <a href="summary.html" title="1.9.&nbsp;Summary">9</a>&nbsp;<span class="divider">|</span>&nbsp;
123             </td>
124            <td width="35%" align="right"><br><a class="NavigationArrow" href="shell.html">The
125 Interactive Shell&nbsp;>></a></td>
126         </tr>
127         <tr>
128            <td colspan="3"><br></td>
129         </tr>
130      </table>
131      <div class="Footer">
132         <p class="copyright">Copyright
133 ゥ 2000, 2001, 2002, 2003, 2004 <a href="mailto:mark@diveintopython.org">Mark
134 Pilgrim</a></p>
135      </div>
136   </body>
137</html>
Note: See TracBrowser for help on using the browser.