James
James

Reputation: 373

Python removed and re-installed; strange behaviour

I've recently upgraded arch from 32 to 64 bit and found pip wouldn't let me install 64 bit packages as old python was 32 bit. I therefore did the following to force a 64 bit python install:

sudo pacman -Rsc python
sudo pacman -S python

However, now I get:

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

If I 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

It's peculiar because it looks like python is linked to python3, which is linked to python3.6, and /usr/bin/python3.6 seems to exist - indeed I can tab-complete it.

However, if I try to execute it:

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

Bash claims it doesn't exist! Anyone got any ideas what's going on?

Upvotes: 1

Views: 79

Answers (1)

James
James

Reputation: 373

This was caused by an incomplete migration to 64 bit linux; I had a 64 bit linux kernel but with a 32 bit userland as I'd not completed every step of method 2 within https://wiki.archlinux.org/index.php/Migrating_between_architectures

Upvotes: 1

Related Questions