因為 debian7.8只有python3.2可以安裝,因此要python3.2的話,需要自己抓python3.4的source code來build,那~為何要用python3.4呢? 因為python-can只有在python3.3版以後才支援native的socket can,所以需要自行抓下來處理~
以下為操作的過程
wget https://www.python.org/ftp/python/3.4.5/Python-3.4.5.tgz
會有問題如下:
root@arm:/opt# wget https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tgz
--2016-09-29 16:35:57-- https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tgz
Resolving www.python.org (www.python.org)... 151.101.192.223, 151.101.128.223, 151.101.64.223, ...
Connecting to www.python.org (www.python.org)|151.101.192.223|:443... connected.
ERROR: The certificate of `www.python.org' is not trusted.
ERROR: The certificate of `www.python.org' hasn't got a known issuer.
查了一下是ssl的問題,安裝一下就ok了
apt-get install ca-certificates
root@arm:/tmp# wget https://www.python.org/ftp/python/3.4.5/Python-3.4.5.tgz
--2016-09-29 18:13:56-- https://www.python.org/ftp/python/3.4.5/Python-3.4.5.tgz
Resolving www.python.org (www.python.org)... 151.101.192.223, 151.101.128.223, 151.101.64.223, ...
Connecting to www.python.org (www.python.org)|151.101.192.223|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 19611207 (19M) [application/octet-stream]
Saving to: `Python-3.4.5.tgz'
100%[======================================>] 19,611,207 274K/s in 45s
2016-09-29 18:14:44 (427 KB/s) - `Python-3.4.5.tgz' saved [19611207/19611207]
這樣就搞定了
---- 接著是build python的事了 ----
cd Python-3.4.5
./configure
make
make install
就build完且安裝完成了,需要注意…以上動作都要很久,要小心服用,電腦會暫時關不了…
沒有留言:
張貼留言