Yes the new Rhino python landscape is confusing (IMO). The short version is: you should continue to use the older GhPython components whenever you want to work with the LBT SDK or LBT objects in your Rhino/Grasshopper files.
The slightly longer version is:
Rhino & Grasshopper have 3 distinct python interpreters now; a 3.x one, an IronPython one, and the older GhPython one. These three interpreters are fully separate from one another, and while it is technically possible to pass some very simple objects between interpreters, it is not recommended, and certainly complex objects like LBT rooms, models, etc cannot be easily moved between them.
The three interpreters do not share system path or dependency environments, and so installing the LBT libraries on the GhPython one will not make them available on the IronPython or v3 ones.
Unless / until the LBT components themselves are updated to work in the ‘new’ interpreters, we will just need to stick with the ‘old’ one.
There’s a lot of fixing and improvements to the new Rhino 8 script editor that Ehsan from McNeel has been working on for the past few years (and is continuing to work on). He has done a great job but, because of all the changes, the earliest that you will see us move the Ladybug Tools components over to the new Script Editor is Rhino 9.
So using the old GHPython component and old IronPython environment is currently the best way to use Ladybug Tools for now in Rhino 8. If you need to summon an old GHPYthon onto your canvas, just double-click it and search for #GHPython (with the #). That will let you bring it up instead of the new script component.
Also for this:
Ehsan gave us a method that we can call to turn the tag off in our old GHPython components. You should find that they are all gone from your Ladybug Tools components if you’ve installed the latest version of Ladybug Tools and run the LB Sync Grasshopper File component to update all of the LBT components on your canvas.
If you want to get the OLD tag to go away on your own custom components, the method Ehsan added into the Rhinocommon SDK is Component.ToggleObsolete(False). You can see that I wrapped it into a function we use in Ladybug Tools here:
So you can make use of it inside your own GHPython component in the following way:
from ladybug_rhino.grasshopper import turn_off_old_tag
turn_off_old_tag(ghenv.Component)
Lastly, I’ll add that the latest Pollination installers add the Ladybug Tools core libraries to the Python paths of the Rhino 8 Script Editor. So, if you use the latest Pollination installer, you should not have any more import errors if you try pasting code from LBT’s GHPython components into a new ScriptEditor component. This means that you can technically use the LBT core libraries in the Rhino 8 script editor if you want. Just beware that the environment of these ScriptEditor components doesn’t really talk to that of the GHPython component as Ed mentioned.
But there is a lot of power and potential in the new script editor, particularly for things like making your own Rhino commands with the LBT SDK. For example, the Rhino 8 ScriptEditor is how I made these Environmental Analysis commands that we have been shipping with the Pollination Rhino installer.