Importing Bazel Project fails in CLion on macOS

2019-04-10 13:11发布

I installed Bazel plugin on my CLion and am trying to import a new Bazel C++ project and I keep hitting into these errors-

tensorflow_gpu-1.8.0lft1-cp27-cp27mu-linux_x86_64.whl is not a supported wheel on this platform.

ERROR: error loading package '': 
Encountered error while reading extension file 'requirements.bzl': no such package '@my_deps//': Traceback (most recent call last):     
File "/private/var/tmp/_bazel_pmanjunath/0f9184e7a61c3740275307da0cc42014/external/io_bazel_rules_python/python/pip.bzl", line 39       _pip_import_impl(repository_ctx, "python")
File "/private/var/tmp/_bazel_pmanjunath/0f9184e7a61c3740275307da0cc42014/external/io_bazel_rules_python/python/pip.bzl", line 35, in _pip_import_impl      fail(("pip_import failed: %s (%s)" % ...)))
pip_import failed:  (tensorflow_gpu-1.8.0lft1-cp27-cp27mu-linux_x86_64.whl is not a supported wheel on this platform. ).

On googling I found people were having this problem on their linux boxes and the solution was to upgrade pip. I did try

$ sudo pip install --upgrade pip
$ pip --version
pip 18.0 from /Library/Python/2.7/site-packages/pip (python 2.7)

but to no avail. I am suspecting that it is picking up the wrong .whl file since the name clearly states its for linux_x86_64.

Any ideas?

1条回答
聊天终结者
2楼-- · 2019-04-10 13:30

it reads tensorflow_gpu-1.8.0lft1-cp27-cp27mu-linux_x86_64.whl is not a supported wheel on this platform. -> which means cp27 & linux (obviously the wrong platform).

here would be a wheel file for MacOS: tensorflow-1.10.0-py2-none-any.whl

it is version 1.10.0, but it might suffice to meet the dependency; to be installed alike:

python2 -m pip install tensorflow-1.10.0-py2-none-any.whl

found at Installing TensorFlow on macOS. in case the wheel file in version 1.10.0 should not meet the dependencies, "Plan B" would be to check out from branch 1.10.0, in order to build from source.

查看更多
登录 后发表回答