-
-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
windows installation error #63
Comments
I have no idea since I don't use windows. But we treated this topic some time ago in another issue, and it looks like Go bindings on Windows are not officially supported, but if you're willing to hack a little bit it seems possible to make them work #46 (comment) I haven't tried it since I don't have a Windows machine |
Hello, lucky to meet here, I also had the same problem on Windows and it was solved after trying some scenarios.As a share, hope it helps:(1) First you need a 64-bit gcc environment (MINGW64) and properly configured to the environment variables (so that go can be called); (2) Next, you need to go to the Tensorflow distribution API (https://www.tensorflow.org/install/lang_c) to download the corresponding C version API; (3) Extract to a suitable directory, then you need to add the directory to the environment variable and log out of the system to log in again. PS: (My own solution is to directly merge 'lib' and 'include' in the file into 'lib' and 'include' under MINGW64, even if this is not easy to manage, but the configuration environment variables are omitted);The MINGW64 I use is supported by msys64. You can then check that tensorflow's C API can be successfully called with the following simple code:#include <stdio.h>
#include <tensorflow/c/c_api.h>
//Note: Include files start with tensorflow layers,if not find, check your environment variables
int main() {
printf("Hello from TensorFlow C library version %s\n", TF_Version());
return 0;
} and Compile the sample program to create an executable file, and then run the following command: gcc hello_tf.c -ltensorflow -o hello_tf
./hello_tf
[output]:Hello from TensorFlow C library version number After that, you can use "go get" to continue installing 'tfgo' and determine whether it is available through the examples in the documentation |
hey @iFANGXIE this is great news! This process can be helpful for other Windows users. Can you open a merge request adding this in a new section in the README? If you speak Chinese, it would be also great if you can update the README.cn.md file. Thank you! |
still not work TnT |
I had the same issue with the C library, thanks a lot HFANFA for your solution, it worked |
If someone use HFANFA's solution and not work, maybe you can try rebot~ and then worked |
Hi, I've installed the Tensorflow for C folder in 'C:\libtensorflow 2.6.0' and added this folder to the Path environment variables. Using 'go get github.com/galeone/tfgo' I get the following error:
Is something else still needed?
The text was updated successfully, but these errors were encountered: