I am attempting to use blender from the command line including bpy functions using https://pypi.org/project/bpy/

I have completed a pip installation and have had no errors or warnings, however when I try to run a script I get ModuleNotFoundError: No module named 'bpy'. I had this working on a previous machine but have not been able to get this working on my current machine (Im assuming im missing a step).

I have downgraded to python 3.7.6 and pip version 20.2.4, I was able to install bpy version - 2.82.1 by pip install bpy (I followed an answer from https://stackoverflow.com/questions/63178840/cannot-install-package-bpy-using-pip).

I then also followed the advice of https://github.com/TylerGubala/blenderpy/issues/13, which is an issue I recognized from the last time I tried to get this working.

I am using windows (as I did on the previous install which worked). Im wondering if im missing something in path or similar. I have checked and my conda environment (base environment) lists bpy as an installed package, yet it cant be found.

Any advice is greatly appreciated.

EDIT: I have checked and my bpy install (2.82) is in the location where the python.exe is for the environment (base) im using (so maybe not a path issue?)


1 Answer 1


After multiple hours of searching, the issue was due to the python interpreter not being automatically changed when activating a different environments within visual studio code.

The bpy module must use python 3.7.6 (for my version anyway) otherwise the module is not found.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .