If you want to play with Blender scripting but the Python packages it ships with aren't enough, you can replace its built-in Python with your own. Here I give you some instructions to swap in a miniconda-managed environment.
These instructions apply for macOS. YMMV.
# If you don't like Homebrew you can just get it from https://www.blender.org/download/
brew install blender
# Blender isn't signed
xattr -drv com.apple.quarantine /Applications/Blender.app
# If you don't like Homebrew you can just get it from https://docs.conda.io/en/latest/miniconda.html
brew install miniconda
conda init
ls /Applications/Blender.app/Contents/Resources/2.*/python/lib
# Note the version of Python in there, e.g. "python3.9"
# Make sure to use the same version here
conda create --name blender python=3.9
cd /Applications/Blender.app/Contents/Resources/2.*
# Archive the original (you may want to restore it)
mv python python.original
# Link to your conda environment
ln -s /usr/local/Caskroom/miniconda/base/envs/blender python
conda activate blender
# Install things with pip or conda, for example:
conda install scikit-learn
pip install requests
pip install pymesh
pip install --upgrade pip wheel future-fstrings
conda deactivate