Cannot use pip with python3.13

I have pip ‘installed’ but it doesn’t work with all of my versions of python. I have the following versions installed:

  • python2.7 (symlink python2)
  • python3.6 (symlink python3)
  • python2.7 (symlink python)

All versions (and symlinks) are installed in /usr/bin/ except 3.13 (/usr/local/bin/). This is the only way I could install 3.13 (which I needed).

When I run any of pip -V, pip3 -V, or pip3.6 -V, I get:
pip 21.3.1 from /home/garth/.local/lib/python3.6/site-packages/pip (python 3.6)

But when I use pip3.13 -V, I get bash: pip3.13: command not found

Similarly, when I try python3.13 -m pip, I get /usr/local/bin/python3.13: No module named pip (When I try this with any other version installed, I get a help menu – since I am missing a parameter)

Any suggestions? Obviously, it would be helpful to be able to add/use modules with python3.13!

Yes, I understand that using a virtual environment would be helpful (?), but I don’t want to do that (my system is already ‘complicated’ enough and I just got it working as it is)

Hi,

would you be ok with having each Python version with its own ecosystem of library packages?

Which IDE are you using for development?

How did you install 3.13? Did you build it? then you need to run a script to get pip install I recall.

Chris Angelico (on this forum) helped me install it (under the odd conditions of my specific version of Linux).

A reminder that everything is installed in /usr/bin, but python 3.13 is in /usr/local/bin. That might cause problems, I bet.

I use Geany. I was using VSCode but it was a storage hog (I only have 14.5 G storage).

However, I can choose which version of python to run (using either direct call or using symbolic links). I have the same problem (using any version) from CLI, so Geany isn’t the issue.

Not sure how to answer this. Is this a virtual env?

Currently, python3.13 is installed in /usr/local/bin, not where everything else is installed.

I used a makefile, if that helps…

Just an fyi … PyCharm has a built-in pip. You don’t have to do this manually via the command prompt. If you’re open to using PyCharm, this might help you with your issue.

Then you need to do an extra step that gets pip installed.
I believe you need to use ensurepip - ensurepip — Bootstrapping the pip installer — Python 3.13.1 documentation

2 Likes

Sorry for the late reply! I had mostly abandoned trying to program in python because of these problems.

Firstly, thanks for you suggestion. However, when I apply the command given in that documentation, python -m ensurepip, I get a significant error, starting with:

Traceback (most recent call last):
  File "<frozen zipimport>", line 601, in _get_decompress_func
ModuleNotFoundError: No module named 'zlib'

(note that python is a symbolic link to python3.13, the version I am trying to get working with PIP)

So, I don’t think that works!

I also tried python -m ensurepip --upgrade, but that shouldn’t work since PIP isn’t already installed. Am I missing something from the documentation.