Add Linux support for Python library path

This commit is contained in:
Miha Kralj
2023-05-05 10:07:14 -07:00
parent 957f4da294
commit 2defde9d94
2 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -49,11 +49,12 @@ jobs:
- name: Install pandas-ta
run: |
sudo apt install python3.10
sudo apt install python3.10-dev
pip3 install numpy
pip3 install pandas
pip3 install pandas-ta
python --version
ls /home/runner/.local/lib/
############## Install more tools
+4 -1
View File
@@ -463,7 +463,9 @@ public static class PythonLibrary {
throw new FileNotFoundException("Python library not found in PATH");
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) {
List<string> pythonLibraries = new List<string>();
return "/usr/lib/x86_64-linux-gnu/libpython3.10.so";
/*
List<string> pythonLibraries = new List<string>();
List<string> directoriesToSearch = new List<string> { "/home/runner/.local/lib" }; // Add more directories as needed
string filePattern = "libpython3.*.so";
SearchFiles(directoriesToSearch, filePattern, pythonLibraries);
@@ -474,6 +476,7 @@ public static class PythonLibrary {
else {
throw new FileNotFoundException("Python library not found");
}
*/
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) {