On 9/27/23 14:02, Zuri Shaddai Kuchipudi via Python-list wrote:

Why it's trying to select an incompatible version when you ask to
upgrade is not something I'd like to speculate on, for me personally
that's a surprise. Maybe something else you did before?

Also make sure you're using a pip that matches your Python. It's usually
safer if you invoke it as:

python -m pip install --upgrade pip

(or whatever the precise name of your Python 2 interpreter actually is)
the code that i want to run and all the libraries are written for python 2 but 
i have seen a video where the person showed the 2to3 pip method in which it 
rewrites the code in python 3 and shows all the necessary changes.

Upgrading to Python 3 is the best answer... except when it isn't. If you want to convert a small project it's usually not too hard; and using a conversion tool can work well.

If you have libraries "not under your control" expect a lot more work.

You can upgrade pip to the latest available version for Python 2.7 - will take some research, I don't know what that version might be.

Or you could try this:

https://bootstrap.pypa.io/pip/2.7/get-pip.py
If you were using a Linux distro, you probably don't want to mess with the "system pip" which is usually set up to understand details of how that distro's Python is packaged. It looks like you're on Windows by the paths in your original message, so that should be okay.

Or... you could just ignore the message suggesting you upgrade pip, and proceed, hoping things will stay working as they are.
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to