Ladybug Tools 1.6.0 installation issue with Rhino 8 (WIP)

I am trying to install LBT for Rhino 8 WIP on Windows 10.0.19041.3086.

I get a lot of “fatal errors” from the LBInstall component:

0. Installing Ladybug Tools core Python libraries.
1. Installing lbt-dragonfly==0.9.408 via pip using
C:\Users\sawen\ladybug_tools\python\python.exe
2. Fatal Python error: initfsencoding: unable to load the file system codec
ImportError: bad magic number in 'encodings': b'a\r\r\n'

Current thread 0x0000222c (most recent call first):
3. 
4. Installing Ladybug Tools recipes.
5. Installing lbt-recipes==0.23.2 via pip using
C:\Users\sawen\ladybug_tools\python\python.exe
6. Fatal Python error: initfsencoding: unable to load the file system codec
ImportError: bad magic number in 'encodings': b'a\r\r\n'

Current thread 0x00003898 (most recent call first):
7. 
8. Installing ladybug-rhino Python library.
9. Installing ladybug-rhino==1.39.6 via pip using
C:\Users\sawen\ladybug_tools\python\python.exe
10. Fatal Python error: initfsencoding: unable to load the file system codec
ImportError: bad magic number in 'encodings': b'a\r\r\n'

Current thread 0x00003ef4 (most recent call first):
11. 
12. Successfully set Python search path to: C:\Users\sawen\ladybug_tools\python\Lib\site-packages
13. Writing set_python_path batch File to:
C:\Users\sawen\ladybug_tools\set_python_path.bat
 
14. Installing Ladybug Tools Grasshopper components.
15. Installing lbt-grasshopper==1.6.0 via pip using
C:\Users\sawen\ladybug_tools\python\python.exe
16. Fatal Python error: initfsencoding: unable to load the file system codec
ImportError: bad magic number in 'encodings': b'a\r\r\n'

Current thread 0x00004b58 (most recent call first):
17. 
18. Installing ladybug-grasshopper-dotnet==1.2.2 via pip using
C:\Users\sawen\ladybug_tools\python\python.exe
19. Fatal Python error: initfsencoding: unable to load the file system codec
ImportError: bad magic number in 'encodings': b'a\r\r\n'

Current thread 0x0000459c (most recent call first):
20. 
21. Installing Honeybee-OpenStudio gem version 2.33.5.
22. Downloading "honeybee-openstudio-gem"  github repository to: C:\Users\sawen\ladybug_tools\resources\measures
23. Copying "honeybee_openstudio_gem" source code to C:\Users\sawen\ladybug_tools\resources\measures\honeybee_openstudio_gem\lib
 
24. Installing Ladybug Tools Measures version 0.2.3.
25. Downloading "lbt-measures"  github repository to: C:\Users\sawen\ladybug_tools\resources\measures
26. Copying "lbt_measures" source code to C:\Users\sawen\ladybug_tools\resources\measures
 
27. Installing Honeybee energy standards.
28. Installing honeybee-energy-standards==2.2.6 via pip using
C:\Users\sawen\ladybug_tools\python\python.exe
29. Fatal Python error: initfsencoding: unable to load the file system codec
ImportError: bad magic number in 'encodings': b'a\r\r\n'

Current thread 0x000044dc (most recent call first):
30. 
31. Setting up user standards.
32. Ladybug Tools 1.6 has been successfully installed
33. RESTART RHINO to load the new components + library.

It claims the installation was successful but I can’t find Ladybug Tools among the GH libraries. What is going on?

Running the commands in cmd instead e.g. ./python -m pip install lbt-dragonfly==0.9.408 works fine so it must be an issue with the communication between the GH script and the Python executable.

Yes Installer Fails on V8 even when Choosing .NetFramework over .NetCore in the setDotnetRuntime.
My way of making it work is to install LBT using V7 and that should work once you launch it in v8.

1 Like

Ladybug Tools 1.7.0 in Rhino 8 , Same issue:
Fatal Python error : init_fs_encoding


“OLD” on icon means what ?

Delete the folder %homepath%.rhinocode\py39-rh8
Restart Rhino
Try Reinstall

OLD is the old python scripting component that has been updated in V8.

More info is here
Getting Ready for Rhino V8 - ladybug-tools - Ladybug Tools | Forum

1 Like

I just wanted to say thanks for answering everyone’s questions here, @tay.0 . That solution definitely works for now, though it completely resets the python environment of Rhino 8 to the “factory default” meaning it’s really only a temporary workaround.

I’m planning to push a new installer to Food4Rhino by the end of this week, which will be fully compatible with Rhino 8 (no more old tags and none of these issues with Rhino 8’s new Python environment variables causing fatal errors).

I just have a few more issues to fix to get all of the components working. I’ll post back here once it’s all on Food4Rhino.

3 Likes

Thank you Chris for everything!

FYI, there is now a release on Food4Rhino that works in Rhino 8:

The latest pollination Rhino/Grasshopper installers are also compatible with Rhino 8.

1 Like

Thank you , Chris :heart: :heart: :heart: