There is no way to run Python scripts using the Blender API without an instance of Blender running. This is however not exactly what you want. What you want is to run a script in/with Blender without the GUI popping up, or even on a headless system, like a web server.
There are two ways to achieve this:
- Recompile Blender as a Python module [difficult]
- Run Blender with the --background option and running an external Python script: “blender -b -P myscript.py”
The second option works with all modern Blender versions out of the box, so this is preferred.
Blender binaries are usually distributed with their own Python environment, which is unfortunately very restricted. This environment lacks any of the modern package management features and of course no VirtualEnv support. It can be very difficult to get compiled extensions working with Blender.
Especially on Windows, Blender supports using the “System Python”, again without recognizing VirtualEnvs. It’s not trivial to set up, but if it works, at least you get to have some package management.
Due to these limitations, Blender scripts are notoriously difficult to distribute if they have any dependencies at all. Pure Python, no deps? No problem, just drop the script in the right directory and everything is fine. Any dependencies? Good luck finding the right directories on every system/version/installation.
This situation is highly frustrating, especially because the Python community outside Blender has solved the “binary packages for multiple platforms” very well by now. Even Microsoft released a free Version of MSVC just to compile Python packages.