If you have both python2 and python3 installed on openSUSE, you might find when you use pip to install packages that they install for python3, not python2!

This seems to be because the pip command that is run comes directly from the python3 install.

To fix it, install the python-pip SUSE package, then use it as default:

zypper install -n python-pip
update-alternatives --config pip

When prompted for which pip to use, ensure you select the python2 version.

Now when you use pip, you’re modifying python2. To modify python3, run pip3.