Add Linux support for Python library path

This commit is contained in:
Miha Kralj
2023-05-05 10:48:26 -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 - name: Install pandas-ta
run: | run: |
sudo apt install python3.10
sudo apt install python3.10-dev
pip3 install numpy pip3 install numpy
pip3 install pandas pip3 install pandas
pip3 install pandas-ta pip3 install pandas-ta
python --version python --version
ls /home/runner/.local/lib/
############## Install more tools ############## Install more tools
+4 -1
View File
@@ -463,7 +463,9 @@ public static class PythonLibrary {
throw new FileNotFoundException("Python library not found in PATH"); throw new FileNotFoundException("Python library not found in PATH");
} }
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { 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 List<string> directoriesToSearch = new List<string> { "/home/runner/.local/lib" }; // Add more directories as needed
string filePattern = "libpython3.*.so"; string filePattern = "libpython3.*.so";
SearchFiles(directoriesToSearch, filePattern, pythonLibraries); SearchFiles(directoriesToSearch, filePattern, pythonLibraries);
@@ -474,6 +476,7 @@ public static class PythonLibrary {
else { else {
throw new FileNotFoundException("Python library not found"); throw new FileNotFoundException("Python library not found");
} }
*/
} }
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) {