Как установить тензорный поток с языком C на Mac? - PullRequest
0 голосов
/ 11 июня 2018

после установки потока с помощью python, я пытаюсь установить с языком C.

Я пытаюсь с:

TF_TYPE="cpu" # Change to "gpu" for GPU support

OS="linux" # Change to "darwin" for macOS
 TARGET_DIRECTORY="/usr/local"
 curl -L \
   "https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-${TF_TYPE}-${OS}-x86_64-1.6.0.tar.gz" |
   sudo tar -C $TARGET_DIRECTORY -xz

Я строю тест с C (hello_tf.c на

#include <stdio.h>
#include <tensorflow/c/c_api.h>

int main() {
  printf("Hello from TensorFlow C library version %s\n", TF_Version());
  return 0;
}

запустить "gcc hello_tf.c" в терминале, и я получаю ошибку

MacBook-Pro:~ juneleungchan$ gcc hello_tf.c
clang: error: no such file or directory: 'hello_tf.c'
clang: error: no input files

запустить в возвышенном, получить ошибку:

clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
Undefined symbols for architecture x86_64:
  "_TF_Version", referenced from:
      _main in hello_tf-bffca9.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[Finished in 0.1s with exit code 1]
[shell_cmd: g++ "/Users/juneleungchan/Desktop/hello_tf.c" -o "/Users/juneleungchan/Desktop/hello_tf"]
[dir: /Users/juneleungchan/Desktop]
[path: /Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin]

Я на OSX 10.12.6, как я могу установить с C?

...