Search code examples
pythonvisual-studio-codepippython-import

Python in VSCode - PIP Error (cmd not found)


Help Me! I'm new! I've been using Python Idle for learning basics but decided to switch to VSCode as a Harvard Professor advised in his tutorial for convenience.

Q. Trying to Import the Basic Cowsay module using PIP (cmd in VSC Terminal: pip install cowsay), getting an ERROR (bash: pip: cmd not found). What am I doing wrong?

Installed Python Extensions in VSCode Tried creating a New File - X Tried installing the module directly - X Still getting error


Solution

  • You need to install PIP seperately.

    First you need to download the file get-pip.py for open up terminal or command prompt and then run the below command:

    curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
    

    After that, based on your Operating system you can try the below:

    Linux & Mac:

    python get-pip.py
    

    Windows:

    py get-pip.py