Accessing blender python API in pyCharm

Hello all,

I need to work my way through scripting using blender’s python API. I have download external python IDE PyCharm and needed to access blender python API here in PyCharm (along with auto completion).

Please guide me through the process.

This can help


Thanks Korchy,
I followed the steps as mentioned and saved the snapshots on the way, just in case. I left steps for auto completion for the later stage. At this stage, pyCharm is still not recognizing blender library. Upon importing bpy in a new script, pyCharm is displaying "no module named “bpy” error.

my ppg.cmd file reads following content:
“C:\Program Files\Blender Foundation\Blender 2.91\2.91\blender.exe” -b -P “C:\Users\Admin\Documents\blenderPycharmIntegration\”

Base Interpretor option in my newProject window reads this path:

I have checked “make available to all projects” option here.

What might be causing the error?

If you missed the autocomplete steps, PyCharm knows nothing about bpy. It might cause an error. And Blender works with python 3.7, not 3.8 but this may be not so important.

the step i was missing was updating my python lib. :relaxed:

upon copying all the data for my blender version 2.91 from your blender_autocomplete_master and pasting it into python lib at C:\Users\Admin\AppData\Local\Programs\Python\Python37\Lib , i am getting blender autocomplete and hover hints in pyCharm.

Thankyou Korchy for sharing blender autocomplete master, and guiding me through the process.