If you want to learn about how to use pip, check out the following resources: Getting Started. Python Packaging User Guide. If you find bugs, need help, or want to talk to the developers, use our mailing lists or chat rooms: GitHub Issues. Discourse channel. User IRC. Development IRC. If you find any security issues, please report to security ...
Little side note for anyone new to Python who didn't figure it out by theirself: this should be automatic when installing Python, but just in case, note that to run Python using the command in Windows' CMD you must first add it to the python environment variable, as explained here.PATH
To execute Pip, first of all make sure you have it installed, so type in your CMD:
> python
>>> import pip
>>>
And it should proceed with no error. Otherwise, if this fails, you can look here to see how to install it. Now that you are sure you've got Pip, you can run it from CMD with Python using the (module) parameter, like this:-m
> python -m pip <command> <args>
Where is any Pip command you want to run, and <command> are its relative arguments, separated by spaces.<args>
For example, to install a package:
> python -m pip install <package-name>
You can always try calling pip through python instead:
py -m pip --version
or
python3 -m pip --version
or
python -m pip --version
Have you tried to install this way instead of using magic?
!pip install <package>
Generally this shouldn't prompt you to proceed.
BTW which package are you trying to install? I have tried both ways using and !pip. Using %pip didn't ask me to proceed but asked me to restart kernel.%pip
%pip install folium
Collecting folium
Downloading https://files.pythonhosted.org/packages/c3/83/e8cb37afc2f016a1cf4caab8d22caf7fe4156c4c15230d8abc9c83547e0c/folium-0.12.1-py2.py3-none-any.whl (94kB)
Requirement already satisfied: requests in c:\users\by20064109\appdata\local\continuum\anaconda3\lib\site-packages (from folium) (2.22.0)
Requirement already satisfied: branca>=0.3.0 in c:\users\by20064109\appdata\local\continuum\anaconda3\lib\site-packages (from folium) (0.4.2)
Requirement already satisfied: numpy in c:\users\by20064109\appdata\local\continuum\anaconda3\lib\site-packages (from folium) (1.16.4)
Requirement already satisfied: jinja2>=2.9 in c:\users\by20064109\appdata\local\continuum\anaconda3\lib\site-packages (from folium) (2.10.1)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\users\by20064109\appdata\local\continuum\anaconda3\lib\site-packages (from requests->folium) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\by20064109\appdata\local\continuum\anaconda3\lib\site-packages (from requests->folium) (1.24.2)
Requirement already satisfied: idna<2.9,>=2.5 in c:\users\by20064109\appdata\local\continuum\anaconda3\lib\site-packages (from requests->folium) (2.8)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\by20064109\appdata\local\continuum\anaconda3\lib\site-packages (from requests->folium) (2019.6.16)
Requirement already satisfied: MarkupSafe>=0.23 in c:\users\by20064109\appdata\local\continuum\anaconda3\lib\site-packages (from jinja2>=2.9->folium) (1.1.1)
Installing collected packages: folium
Successfully installed folium-0.12.1
Note: you may need to restart the kernel to use updated packages.
Try adding to PATHC:/path/to/python/Scripts/
There should be a pip.exe there!