Installing a pip package from within a Jupyter Notebook not working

In IPython (jupyter) 7.3 and later, there is a magic %pip and %conda command that will install into the current kernel (rather than into the instance of Python that launched the notebook).

%pip install geocoder

In earlier versions, you need to use sys to fix the problem like in the answer by FlyingZebra1

import sys
!{sys.executable} -m pip install geocoder

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)