Question: Blender comes with Python, and includes a stand-alone Python executable.
However pip is not part of the official Python distribution so it needs to be added separately.

* How do you setup `pip` with Blender's bundled Python so it can be used to install Python packages from [Pypi](https://pypi.org/) which are then available from inside Blender?
* How would you use it to install a package?

---

Note, this is related to [this question](https://blender.stackexchange.com/questions/14489/), but not a duplicate since its not about using pip as a library.

Answer: 
Using pip by `blender --python-expr`

```
# Get pip: equl to /blender-path/2.xx/python/bin/python3.7m -m ensurepip
blender -b --python-expr "__import__('ensurepip')._bootstrap()" 

# Update pip toolchain
blender -b --python-expr "__import__('pip._internal')._internal.main(['install', '-U', 'pip', 'setuptools', 'wheel'])"

# pip install numpy (or any package)
blender -b --python-expr "__import__('pip._internal')._internal.main(['install', 'numpy'])"
```

```
On Debian, using the Debian-packaged version of Blender, as far as I can tell, a system python executable is used.

For 2.78, I was able to do the following:

```
# apt-get install python3-pip
# pip3 install python-package-name

```

After that, the pip-installed package was available from within Blender.