Assuming that you already have pip or easy_install installed on your python distribution, I would like to know how can I installed a required package in the user directory from
As of pip version >= 10.0.0, the above solutions will not work because of internal package restructuring. The new way to use pip inside a script is now as follows:
try: import abc
except ImportError:
from pip._internal import main as pip
pip(['install', '--user', 'abc'])
import abc