Keras.NET
Keras.NET copied to clipboard
How to configure python environments on linux
Hello, I am using the dotnet cli on Linux to run this project and I am trying to load a model I already built using python; however, I am receiving an error when I run the project telling me that it is unable to load the shared library 'python38'. I believe this is due to the fact that my python3.8 environment is a conda environment; therefore, I think I would only have to configure which python environment it should be using. Is there a way to select which conda environment my project should load? How would I go about resolving this issue?
Steps to reproduce
- Create a new solution and project
- install keras.net
- in main function, add the following code
var model = Keras.Models.Model.LoadModel("pathtomodel.json"); - run the project
I am receiving the following error:
Error Message: System.DllNotFoundException : Unable to load shared library 'python38' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libpython38: cannot open shared object file: No such file or directory
Any luck solving this?
Well, nvm, figured this out.
For anyone wondering - things I changed in order to fix the problem is target framework (I think I ended with net5.0), and manually and explicitly adding nuget for my platform (pythonnet 38, linux 64 in my case)
Stale issue message