File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,10 @@ def is_windows():
4444 return platform .system () == "Windows"
4545
4646
47+ def is_raspi_arm ():
48+ return os .uname ()[4 ] == "armv7l"
49+
50+
4751def get_tf_header_dir ():
4852 import tensorflow as tf
4953
@@ -60,6 +64,8 @@ def get_tf_shared_lib_dir():
6064 if is_windows ():
6165 tf_shared_lib_dir = tf .sysconfig .get_compile_flags ()[0 ][2 :- 7 ] + "python"
6266 return tf_shared_lib_dir .replace ("\\ " , "/" )
67+ elif is_raspi_arm ():
68+ return tf .sysconfig .get_compile_flags ()[0 ][2 :- 7 ] + "python"
6369 else :
6470 return tf .sysconfig .get_link_flags ()[0 ][2 :]
6571
@@ -75,6 +81,9 @@ def get_shared_lib_name():
7581 elif is_windows ():
7682 # Windows
7783 return "_pywrap_tensorflow_internal.lib"
84+ elif is_raspi_arm ():
85+ # The below command for linux would return an empty list
86+ return "_pywrap_tensorflow_internal.so"
7887 else :
7988 # Linux
8089 return namespec [1 ][3 :]
You can’t perform that action at this time.
0 commit comments