skip to Main Content

I am trying to install both pip

pip install PyAutoGUI
pip install python-telegram-bot

but both also show the similar error message.

enter image description here

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


  1. Chosen as BEST ANSWER

    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.


  2. pip install PyAutoGUI

    pip install python-telegram-bot

    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:

    pip install --upgrade setuptools
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search