LoginSignup
1
0

More than 5 years have passed since last update.

Pythonをソースインストールして導入

Posted at

1.ダウンロード

# wget http://www.python.org/ftp/python/3.3.3/Python-3.3.3.tgz

100%[===================================================================================================================>] 16,808,057  23.0M/s 時間 0.7s    

2015-04-26 13:15:57 (23.0 MB/s) - `Python-3.3.3.tgz' へ保存完了 [16808057/16808057]

2.解凍

# tar zxvf Python-3.3.3.tgz

3.configure
・Makefileが出来ていれば大丈夫なはず

# cd  Python-3.3.3
[root@v157-7-196-182 Python-3.3.3]# ./configure --prefix=/usr/local/python
creating Modules/Setup
creating Modules/Setup.local
creating Makefile

4.Maketest
・なぜかエラー・・・URL不一致?

# make test 
======================================================================
FAIL: test_geturl (test.test_urllibnet.urlopenNetworkTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/Python-3.3.3/Lib/test/test_urllibnet.py", line 88, in test_geturl
    self.assertEqual(gotten_url, URL)
AssertionError: 'https://www.python.org/' != 'http://www.python.org/'
- https://www.python.org/
?     -
+ http://www.python.org/


----------------------------------------------------------------------
Ran 13 tests in 0.472s

FAILED (failures=1, errors=3)
test test_urllibnet failed
make: *** [test] エラー 1

5.(構わず)Make
・行けた

# make 

# ll /usr/local/python/bin/python3.3
-rwxr-xr-x. 2 root root 7785682  4月 26 14:26 2015 /usr/local/python/bin/python3.3

6.インタラクティブモードで実行

# python
Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print "Hello, World!"
Hello, World!

とりあえずDone!

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0