Keras.NET icon indicating copy to clipboard operation
Keras.NET copied to clipboard

Can it be run on Ubuntu?

Open akaimody123 opened this issue 3 years ago • 3 comments

Hi, thank you for this useful package! I'm new to C# and I wonder if this can be run on Ubuntu via Mono? In the nuget description, it says it is just for win64. I tried to download it and run the example code via Mono, it crashes every time.

akaimody123 avatar Feb 24 '21 09:02 akaimody123

The platform dependend part is the Python.Runtime.dll. I could run the sample on Ubuntu by swapping the Python.Runtime.dll built for win64 against the version built for Linux after building the program. There are many versions of Python.Runtime.dll for different platforms. To get the Linux version, write a small command line application and add pythonnet_netstandard_py38_linux as nuget package. Using an AssemblyResolve event would allow you to swap the DLLs dynamically at runtime.

MatthiasRabald avatar Mar 11 '21 19:03 MatthiasRabald

There's a Linux package: Keras.Net.Mono

erichiller avatar Mar 19 '21 15:03 erichiller

@MatthiasRabald @MatthiasRabald Thank you both for your answer! I have tried both, but it still give me the following error which I think is related to protobuf. But as ubuntu needs the default version of 2.6.1, I cannot replace that with the newer version. I also tried add the newer version of protobuf to the path but it seems it is still using 2.6.1 in unity. Error from the log file: Fallback handler could not load library /home/pat/Unity/Hub/Editor/2019.3.14f1/Editor/Data/Mono/lib/libpython3.8 Fallback handler could not load library /home/pat/Unity/Hub/Editor/2019.3.14f1/Editor/Data/Mono/lib/libadvapi32.dll Fallback handler could not load library /home/pat/Unity/Hub/Editor/2019.3.14f1/Editor/Data/Mono/lib/libadvapi32.dll.so Fallback handler could not load library /home/pat/Unity/Hub/Editor/2019.3.14f1/Editor/Data/Mono/lib/advapi32.dll Fallback handler could not load library /home/pat/Unity/Hub/Editor/2019.3.14f1/Editor/Data/Mono/lib/libadvapi32 Fallback handler could not load library /home/pat/Unity/Hub/Editor/2019.3.14f1/Editor/Data/Mono/lib/libadvapi32.so Fallback handler could not load library /home/pat/Unity/Hub/Editor/2019.3.14f1/Editor/Data/Mono/lib/advapi32 Fallback handler could not load library /home/pat/Unity/Hub/Editor/2019.3.14f1/Editor/Data/Mono/lib/libadvapi32.dll Fallback handler could not load library /home/pat/Unity/Hub/Editor/2019.3.14f1/Editor/Data/Mono/lib/libadvapi32.dll.so Fallback handler could not load library /home/pat/Unity/Hub/Editor/2019.3.14f1/Editor/Data/Mono/lib/libadvapi32.dll Fallback handler could not load library /home/pat/Unity/Hub/Editor/2019.3.14f1/Editor/Data/Mono/lib/libadvapi32.dll Fallback handler could not load library /home/pat/Unity/Hub/Editor/2019.3.14f1/Editor/Data/Mono/lib/libadvapi32.dll.so Fallback handler could not load library /home/pat/Unity/Hub/Editor/2019.3.14f1/Editor/Data/Mono/lib/advapi32.dll Fallback handler could not load library /home/pat/Unity/Hub/Editor/2019.3.14f1/Editor/Data/Mono/lib/libadvapi32 Fallback handler could not load library /home/pat/Unity/Hub/Editor/2019.3.14f1/Editor/Data/Mono/lib/libadvapi32.so Fallback handler could not load library /home/pat/Unity/Hub/Editor/2019.3.14f1/Editor/Data/Mono/lib/advapi32 Fallback handler could not load library /home/pat/Unity/Hub/Editor/2019.3.14f1/Editor/Data/Mono/lib/libadvapi32.dll Fallback handler could not load library /home/pat/Unity/Hub/Editor/2019.3.14f1/Editor/Data/Mono/lib/libadvapi32.dll.so Fallback handler could not load library /home/pat/Unity/Hub/Editor/2019.3.14f1/Editor/Data/Mono/lib/libadvapi32.dll [libprotobuf FATAL google/protobuf/stubs/common.cc:61] This program requires version 3.8.0 of the Protocol Buffer runtime library, but the installed version is 2.6.1. Please update your library. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in "bazel-out/k8-opt/bin/tensorflow/core/framework/tensor_shape.pb.cc".) terminate called after throwing an instance of 'google::protobuf::FatalException' what(): This program requires version 3.8.0 of the Protocol Buffer runtime library, but the installed version is 2.6.1. Please update your library. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in "bazel-out/k8-opt/bin/tensorflow/core/framework/tensor_shape.pb.cc".) Caught fatal signal - signo:6 code:-6 errno:0 addr:0x3e800003e6b

akaimody123 avatar Mar 22 '21 13:03 akaimody123

Stale issue message

github-actions[bot] avatar Aug 03 '23 00:08 github-actions[bot]