本文介绍了在macOS上的CLion中导入Bazel Project失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在CLion上安装了Bazel插件,并试图导入一个新的Bazel C ++项目,但我不断遇到这些错误-

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在此平台上不受支持.

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. ).

在谷歌搜索中,我发现人们在Linux机器上遇到了这个问题,解决方案是升级pip.我确实尝试过

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)

但无济于事.我怀疑它选择了错误的.whl文件,因为该名称清楚地指出了linux_x86_64的文件.

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.

有什么想法吗?

推荐答案

读取tensorflow_gpu-1.8.0lft1-cp27-cp27mu-linux_x86_64.whl is not a supported wheel on this platform.->表示cp27& linux(显然是错误的平台).

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).

这将是MacOS的转盘文件: tensorflow-1.10.0-py2-none-any.whl

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

它是版本1.10.0,但是满足依赖关系可能就足够了;一样安装:

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

位于在macOS上安装TensorFlow .如果版本1.10.0中的wheel文件不符合依赖关系,则计划B"将从分支1.10.0 ,以便从源代码进行构建.

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.

这篇关于在macOS上的CLion中导入Bazel Project失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 00:06