I am trying to install both pip
pip install PyAutoGUI
pip install python-telegram-bot
but both also show the similar error message.
it stated about WinError 2.
My python version is Python 3.10.7
I’ve directed the right path in System Environment Variable to python.exe.
Anyone has experienced this error?
2
Answers
I found the solution:
rollback pip to an older version:
python -m pip install pip==18.1 install desired module:
pip install pyautogui update pip:
python -m pip install --upgrade pip P.S. this solution works for other modules too.
This was answered by Michael Chon in other post.
This install command works on my vscode.
I guess you have an out of date version of setuptools. Try the following codes to update your setuptools and reinstall the two packages: