Importing Bazel Project fails in CLion on macOS

时光总嘲笑我的痴心妄想 提交于 2019-12-06 04:03:28

问题


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:


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.



来源:https://stackoverflow.com/questions/51814012/importing-bazel-project-fails-in-clion-on-macos

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!