Question

I am building an Arch Linux system from scratch, and presently there is no Python in the system. I could install Python2.7 by using this command:

pacman -S python2

But when I try to install some package for python like this:

pacman -S python-numpy

Pacman only shows option to download Python3.x and numpy for Python3.x. There is no other option available. How can I make sure that when I search for Python stuff, it only searches based on which Python version I have installed? There is no Python3 in my system and I have no need of it at all. In my Ubuntu system, I do not specify the Python version but it is always taken care of. I have no clue how to handle this in Arch Linux.

Thanks in advance!

Was it helpful?

Solution

In Arch Linux the default Python version is 3, so all python-* packages (including python itself) are for Python3. Fortunately Python2 is still fully supported, they are just prefixed with python2-* instead. So to install numpy you would do pacman -S python2-numpy.

OTHER TIPS

Also if you want to download the packages specific to python2.7 from Python Package Index you'll have to use pip2. e.g.:

sudo pip2 install <package name>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top