Blender add-ons that need NumPy, meshio, or requests hit the same wall: Blender ships its own Python, so system pip does nothing useful. I wrote a small installer that targets Blender’s sys.executable, drops wheels under scripts/modules, and runs in a background thread so the UI stays responsive (Blender 4.2+, Windows). Version française.

The problem in one sentence
You cannot pip install globally and expect import meshio inside Blender — the interpreter path is Blender’s bundled runtime.
Strategy
| Piece | Role |
|---|---|
sys.executable | Invoke pip against Blender’s Python |
bpy.utils.user_resource("SCRIPTS", path="modules") | Writable install dir per user/version |
site.addsitedir | Make imports resolve next launch |
Background thread + bpy.app.timers | Avoid freezing the UI; show popups when done |
The installer script (core idea)
REQUIRED_PACKAGES = {
"fileseq": "fileseq==1.15.2",
"meshio": "meshio==5.3.4",
"rich": "rich==13.7.0",
"requests": "requests==2.31.0",
}
def install_package(package, modules_path):
subprocess.check_call([
sys.executable, "-m", "pip", "install",
"--upgrade", "--target", modules_path, package,
])
Full script in the Medium article and my repo copies — includes progress bar hooks and __import__ checks to skip already-installed wheels.
How to run it
Option A — Scripting workspace: paste in Text Editor → Run Script → wait for popup.
Option B — Add-on register():
def register():
modules_path = get_modules_path()
append_modules_to_sys_path(modules_path)
background_install_packages(REQUIRED_PACKAGES, modules_path)
Ship dependencies with your add-on so users are not guessing which Python to use.
Troubleshooting
- Restart Blender after first install.
print(sys.path)if imports fail — confirmmodulesis listed.- Version pin wheels — Blender’s Python version is not your system 3.12.
When not to use this pattern
| Case | Why |
|---|---|
| Add-on targets many Blender versions | Pin and test per minor version |
| Heavy CUDA stacks | May exceed user GPU/driver setup |
| Corporate locked-down PCs | pip may be blocked — vendor wheels manually |
Takeaway
Automate dependency install inside Blender’s sandbox; users stop emailing “which Python?” — you own the matrix in REQUIRED_PACKAGES.
Related posts
- Skate rack — CAD to plywood — physical maker pipeline
- AI figurines / 3D print — mesh tools in another ecosystem
References
Originally published on Medium.