0

I wanted to install a package to be used with pypy3. I blindly followed some instructions (which I don't remember now, it was decent time ago), most likely using pypy3 -m ensurepip script to setup pip for pypy3.

Okey, now running pip3 install xyz installs xyz for pypy3 (and not python3). But I want to be back and use pip3 (or any other command) for the normal cpython python3.

Running pip3 --version yields pip 21.1.2 from /home/zaabson/.local/lib/pypy3.6/site-packages/pip (python 3.6). And which pip3 == /home/zaabson/.local/bin/pip3 so I belive it's still the same pip3 just configured for pypy3 and I don't know what to change to fully reconfigure it.

Best would be to be able to switch between installing for python3 and pypy3, but I want to stick to global installations as always and not bother with virtualenv's. Also I'm on ubuntu so removing python is out of question, as the whole system depends on it.

Also wishfully running python3 -m ensurepip(3) gets /usr/bin/python3 No module named ensurepip and how can I get it?

Thanks in advance

zaabson
  • 151
  • 12
  • 1
    Just run `pypy3 -m pip install` and `python3-m pip install` depending on what you want. the executable `pip3` is ambiguous here. – FlyingTeller Nov 08 '21 at 09:31
  • Unsure why it ended up in `/home/zaabson/.local/bin/pip3`, but you can simply remove this file (or the whole directory after checking it contains nothing of interest to you). – Armin Rigo Nov 09 '21 at 09:38
  • Thanks, `(python3/pypy3) -m pip install xyz` is the way. – zaabson Nov 09 '21 at 21:15
  • @ArminRigo I now inspected this "/.local/bin/pip3" and its a python script so starting with `#!/usr/bin/pypy3`. Just for fun I've changed it to `#!/usr/bin/python3` and now indeed command "pip3" installs for python3 as I wanted :D – zaabson Nov 09 '21 at 21:18

0 Answers0