删除并重新安装Python;奇怪的行为

时间:2017-02-19 10:43:02

标签: python python-3.x archlinux

我最近将arch从32位升级到64位,发现pip不会让我安装64位软件包,因为旧的python是32位。因此我做了以下强制64位python安装:

sudo pacman -Rsc python
sudo pacman -S python

然而,现在我得到了:

[james@tryptophan bin]$ python
-bash: /usr/bin/python: No such file or directory

如果我是ls-l:

[james@tryptophan 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.6,并且/usr/bin/python3.6似乎存在 - 实际上我可以用Tab来完成它。

但是,如果我尝试执行它:

[james@tryptophan bin]$ /usr/bin/python3.6
-bash: /usr/bin/python3.6: No such file or directory

Bash声称它不存在!任何人都有任何想法会发生什么?

1 个答案:

答案 0 :(得分:1)

这是由于向64位linux的迁移不完整造成的;我有一个64位的Linux内核,但有32位用户空间,因为我没有完成https://wiki.archlinux.org/index.php/Migrating_between_architectures中方法2的每一步