First make sure your Blender *System Console* is open by clicking menu *Window > Toggle System Console* so you can see installation progress.

[![enter image description here][1]][1]

Go to *Scripting Tab* and run the following script. It simply gets the path to your current `python_exe` file and installs the [`ensurepip`][2] module, which can install *pip* in a Python environment. `pip` is simply a thing that can install python packages such as [NumPy][3].

    import subprocess
    import sys
    import os
    
    python_exe = os.path.join(sys.prefix, 'bin', 'python.exe')
    
    subprocess.call([python_exe, '-m', 'ensurepip'])
    subprocess.call([python_exe, '-m', 'pip', 'install', '--upgrade', 'pip'])

This can take a while, so check your console to see the progress. Once pip has been successfully installed, you can run this script to install any python package. In this example I install the [SciPy][4] library package:

    import subprocess
    import sys
    import os
    
    python_exe = os.path.join(sys.prefix, 'bin', 'python.exe')
    subprocess.call([python_exe, '-m', 'pip', 'install', '--upgrade', 'scipy'])

[![enter image description here][5]][5]

Replace *scipy* with any other library or package you need to install.


  [1]: https://i.sstatic.net/uu4HW.png
  [2]: https://pip.pypa.io/en/stable/installation/#ensurepip
  [3]: https://numpy.org/
  [4]: https://www.w3schools.com/python/scipy/scipy_intro.php
  [5]: https://i.sstatic.net/52vh9.png