Reputation: 6764
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!
Upvotes: 15
Views: 46686
Reputation: 310
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>
Upvotes: 9
Reputation: 19114
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
.
Upvotes: 19