'Installed Python 3.9.10 but pip seems to not be working

I have just installed Python 3.9.10, it seemed to be working fine until I tried to install a package with 'pip' I got this error message: "System cannot execute the specified program". I then tried executing this command "python -m pip --version" that resulted in this: screenshot of error message.

I made sure to add python to the system's PATH and also tried uninstalling and installing again but to no avail. I would appreciate any help, thanks in advance.



Solution 1:[1]

Null byte means that there are some null characters in pip or pip3 files that's means the file is not downloaded correctly, remove the whole python and then download it. Or try to use this answer: [1]: Python: source code string cannot contain null bytes

It will help you in how to remove these null characters.

Solution 2:[2]

Try uninstalling the program, in ehich you got the error.

And then try,

python -m pip install --upgrade pip

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Shaiq Paracha
Solution 2 CodeWithYash