How to write my add-on so that when installed it also installs dependencies (let's say: scipy or numpy-quaternion)? How to write my add-on so that when installed it also installs dependencies (let's say: scipy or numpy-quaternion)?

Does blender understand setuptools (setup.py)?

Thanks,

Note: I'm using blender 2.8
Ran into the same issue and received helpful responses on devtalk. There's also another post that was helpful when installing  pip for 2.81.
2.81
import subprocess
import bpy

py_exec = bpy.app.binary_path_python
# ensure pip is installed &amp; update
subprocess.call([str(py_exec), &quot;-m&quot;, &quot;ensurepip&quot;, &quot;--user&quot;])
subprocess.call([str(py_exec), &quot;-m&quot;, &quot;pip&quot;, &quot;install&quot;, &quot;--upgrade&quot;, &quot;pip&quot;])
# install dependencies using pip
# dependencies such as 'numpy' could be added to the end of this command's list
subprocess.call([str(py_exec),&quot;-m&quot;, &quot;pip&quot;, &quot;install&quot;, &quot;--user&quot;, &quot;scipy&quot;])

Warnings:

On Windows, Blender must be run in Administrator mode. Blender may need to restart before using the installed dependency.
Installing dependencies requires an active internet connection