TensorFlow C++ API Installation Instructions

2,197 views
Skip to first unread message

stephen....@zmp.co.jp

unread,
Aug 6, 2018, 9:25:36 PM8/6/18
to Discuss
Dear TensorFlow,

I am writing to request instructions on how to install the TensorFlow C++ API. On the page here:




It gives details on how to use it, but there are no instructions anywhere on how to install it? There are very detailed instructions on installing the Python API and even the C one. But the only information on how to install the C++ one is from third parties, where there are many with very little consistency between them. What we desire is official instructions from TensorFlow on the best way to install?

Thank you for taking the time to read this email / request, and I look forward to hearing your response.

Kind regards

Rostanti, Stephen

unread,
Aug 7, 2018, 5:07:21 AM8/7/18
to dis...@tensorflow.org

Boris Sergeev

unread,
Aug 7, 2018, 6:10:40 PM8/7/18
to Discuss
What OS are you on?

Installing in Ubuntu is as simple as cloning tensorflow repo, installing bazel, and building everything.
In Windows, things are more complicated for building your app outside of tensorfle, but keeping it inside (e.g. under tensorflow/cc/example, as C++ guide suggests) allowes bazel to build it, linking tensorflow statically.

I haven't tried building with CMake outside of Windows, but, while it works in Windows, it rebuilds basically everything (with a single build process, which takes literally hours!). Besides, official  CMake support will be dropped in the upcoming version...

Edd Wilder-James

unread,
Aug 8, 2018, 1:59:51 PM8/8/18
to Discuss
Hi Stephen, here's the situation as it stands now.

To develop against the C++ API, it's not a case of installing TensorFlow, but working within a clone of the TF repository itself. See https://www.tensorflow.org/api_guides/cc/guide for more details.

You might also have some luck using Bazel to use TF as an external dependency in this case, see https://docs.bazel.build/versions/master/external.html
Reply all
Reply to author
Forward
0 new messages