2017-02-19 63 views
1

我最近升級了拱從32位到64位,發現pip不會讓我安裝64位軟件包,因爲舊的python是32位。所以我做了以下強制64位蟒蛇安裝:刪除並重新安裝了Python;奇怪的行爲

sudo pacman -Rsc python 
sudo pacman -S python 

不過,現在我得到:

[[email protected] bin]$ python 
-bash: /usr/bin/python: No such file or directory 

如果我LS-L:

[[email protected] bin]$ ls -l /usr/bin/pyth* 
lrwxrwxrwx 1 root root  7 Jan 16 11:14 /usr/bin/python -> python3 
lrwxrwxrwx 1 root root  9 Dec 21 07:25 /usr/bin/python2 -> python2.7 
-rwxr-xr-x 1 root root 5588 Dec 21 07:26 /usr/bin/python2.7 
-rwxr-xr-x 1 root root 1681 Dec 21 07:25 /usr/bin/python2.7-config 
lrwxrwxrwx 1 root root 16 Dec 21 07:25 /usr/bin/python2-config -> python2.7-config 
lrwxrwxrwx 1 root root  9 Jan 16 11:14 /usr/bin/python3 -> python3.6 
-rwxr-xr-x 2 root root 10392 Jan 16 11:14 /usr/bin/python3.6 
lrwxrwxrwx 1 root root 17 Jan 16 11:14 /usr/bin/python3.6-config -> python3.6m-config 
-rwxr-xr-x 2 root root 10392 Jan 16 11:14 /usr/bin/python3.6m 
-rwxr-xr-x 1 root root 3146 Jan 16 11:14 /usr/bin/python3.6m-config 
lrwxrwxrwx 1 root root 16 Jan 16 11:14 /usr/bin/python3-config -> python3.6-config 
lrwxrwxrwx 1 root root 14 Jan 16 11:14 /usr/bin/python-config -> python3-config 

很奇特,因爲它看起來像python鏈接到python3,python3鏈接到python3.6,並且/usr/bin/python3.6似乎存在 - 的確我可以製表完成它。

但是,如果我嘗試執行它:

[[email protected] bin]$ /usr/bin/python3.6 
-bash: /usr/bin/python3.6: No such file or directory 

猛砸聲稱它不存在!任何人有什麼想法發生了什麼?

+0

'ldd/usr/bin/python3.6'的輸出是什麼? – phihag

+0

'[james @ tryptophan bin] $ ldd /usr/bin/python3.6 \t不是動態可執行文件'所以我猜這也是一個鏈接...?但我不知道該怎麼做... – James

+0

不,這不是一個鏈接,因爲那樣的話ls會顯示它。最有可能是腳本或另一種可執行格式的文件。你介意發佈'file /usr/bin/python3.6; head -n 3/usr/bin/python3.6'? – phihag

回答