Failed to import xxx: no module named xxxx LBT 1.0.0 release

That’s it! I installed using the installer.gh file.

It would be helpful if the installer.gh file included some text that tells you to run the .bat file after closing Rhino/gh. I didn’t find it intuitive that grasshopper would need to be closed because I was following instructions inside of a grasshopper.

1 Like

The installation instructions have WITH RHINO CLOSED in bold but we can add something similar to the first component in installer.gh. We had a dialog with the McNeel team to get us some way to avoid having this step but they couldn’t implement the change for Rhino 6. If they deliver on what they were promising, there should be a way to avoid it in Rhino 7.

And, needless to say, anyone purchasing the single-click executable installer doesn’t need to worry about this at all.

FYI , I can now report that the McNeel team has delivered on their Rhino 7 promise. For the sake of not breaking things, I think I won’t change how the installation process works in Rhino 7 until our next stable release (at which point Rhino 7 will hopefully have an official release). But just know that the days of this confusing installation step are numbered and we’ll be able to get rid of it in Rhino 7.

1 Like

And I’m taking your suggestion for the installer.gh:

I updated the link on Food4Rhino to have an installer.gh with the all-caps WITH RHINO CLOSED

1 Like

I’m having issues installing LBT 1.0.0 too and I did close rhino to run set_python_path.bat.
I have this error: Solution exception: Failed to import ladybug: No module named xxxx” and I also notice there is some line missing when running set_python_path.bat

@alize,
From your screenshot, your Python path has not been set to anything. It should look something like this:

This might be because you have a . in your user name. Do you have the following file on your machine:

D:\DATA\a.lalsingue\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\settings-Scheme__Default.xml

Hi Criss I have the same problem. my user name has a space.
I dont have the file settings-Scheme__Default.xml in the AppData\Roaming…\settings

Same error, no LBT modules are able to load. I ran the set_python_path.bat with Rhino closed, no file was created in ...\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings. I created a settings-Scheme__Default.xml file manually following the example from here: Why do I get this message: Failed to import X: No module named X, but still no luck.
No spaces, dots, or special characters in my ladybug_tools path.

My temporary fix was to create a python component in grasshopper to extend the path like this:

# corrected previous suggestion:
import sys
mypath = "C:\Users\<Username>\ladybug_tools\python\Lib\site-packages"
if mypath not in sys.path:
    sys.path.append(mypath)

where <Username> has to be replaced with your username.
After running the solution again, everything loaded properly.

1 Like

Thanks @spyros ,

Using a sys.path.extend method is always an option. What happens when you run the following:

import sys
print('\n'.join(sys.path))

Do you not get a search path that includes an IronPython settings folder like so?

I did that and got this

I am having the same issue. I ran the set_python_path.bat with Rhino closed and a file was created, but in Rhino 7. See Below:


Any suggestions. I would prefer not to uninstall Rhino 7.

Hi Chris, thanks for the response.
The first three locations show up in the path, but the last one C:\Users\<Username>\ladybug_tools\python\Lib\site-packages is missing.

For everyone who has run the .bat file but receives an blank/empty space after the Setting the search path in the following file was successful:, I have posted a manual workaround for you:

As I say in the post there, our primary recommendation for this case is to just purchase an executable installer by emailing info@ladybug.tools. But, if you’re just doing the install on one machine have some time to spend, the manual workaround will get you there. And will save you from the current workaround @spyros is doing by adding a custom GHPython component to each Grasshopper definition.

3 Likes

@m.gilvez ,
That window is telling you that your running of the .bat file was successful. You should now be able to run the Ladybug Tools plugin with Rhino 7.

Sorry for being unclear - I want to run Ladybug in Rhino 6, and it is in Rhino 6 that I see the "no module named . . . " error. I use both Rhino 6 and 7, but I predominantly use 6 since I work with other folk that are not using 7. Is there a way to install Ladybug/Honeybee 1.1.0 to work with Rhino 6 and 7? If I need to choose I would want it to work with 6, but I didn’t see any options in the install or batch file.

Just want to report that i installed yesterday Rhino 7. When i open it and GH with an LBT file, all LBT components were red. I closed Rhino and run the .bat file, as instructed in the link above. Now it is working fine. I have both 6 and 7 running on the same machine.
-A.

Yes, that’s how it’s intended to work @AbrahamYezioro . It seems that @m.gilvez 's issue is that the script in the .bat file can’t find the settings file for Rhino 6 but it finds it for Rhino 7. In any case, if @m.gilvez follows the manual instructions that I posted using Rhino 6, everything should work.

A post was split to a new topic: How do HB-Energy building programs work?

Hi Chris! I’m using Rhino6 on Mac and ran the installer all correctly. But I still got the error message ‘Failed to import ladybug: no modular named ladybug.epw’ when I tried to start using the plugin. Any idea?
Thanks !!!

I would try re-running the second component of the installer, @zheng_zhou and restart Rhino. On mac, that should re-copy the core libraries to your Rhino Scripts folder.