How solve "AttributeError: 'NoneType' object has no attribute 'ui_type'"? in Jupyter notebook i have loaded bpy module :

import bpy


with no problem. But if i load the 3D view : 

bpy.context.area.ui_type = 'VIEW_3D'


give me this error :

AttributeError: 'NoneType' object has no attribute 'ui_type'


How to solve this?
bpy as a python module is headless

There is no ui associated with bpy that is compiled as a python module. Objects like screen area and region are part of the UI which being non existent, are given the value None.