All the ways to import Python libraries into your Blender scripts
When we code a blender script sometimes we need to use some other python libraries.
The standard solution is to include into your script code the library code.
An easy workaround is to use virtualenv
python3.7 -m venv external_libraries
pip install -r requirements.txt
From the Blender script we can find the coode of the library at external_libraries/lib_bame/…
Sometimes we use some library every day and we want that this library are in every project. The solution is to add this libraries directly to blender.
./python3.7m -m ensurepip
./python3.7m -m pip install your_libraries
To release an addon obviously the first solution is the best one, because we cannot ask to the user to install library inside blender, and different plugin can have different version of the same library, so it can be a problem.
But if we use very offen plugin with some library for experimental reason or we develop every day may be it can be a great solution to be more efficient in particular for learn.