Question: Here I check the installed version of pip
`py -m pip --version`

```
pip 21.0.1 from C:\Users\hp\AppData\Local\Programs\Python\Python39\lib\site-packages\pip (python 3.9)

```

Now I try to run a pip command

`pip install pip --target $HOME\\.pyenv` 

```
pip: The term 'pip' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

```

Answer: 
Add the scripts folder to PATH

`C:\Users\hp\AppData\Local\Programs\Python\Python39\Scripts`

or

`C:\Python39\Scripts`
(depending on how you have installed python locate and add python/scripts folder)
Just use on the terminal:

```
py -m pip install

```

followed by the library you want to install. It tends to work.