在 macOS 上的 CLion 中导入 Bazel 项目失败
Importing Bazel Project fails in CLion on macOS
我在我的 CLion 上安装了 Bazel 插件并尝试导入一个新的 Bazel C++ 项目,但我一直遇到这些错误-
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
。我试过了
$ 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
.
有什么想法吗?
它显示为 tensorflow_gpu-1.8.0lft1-cp27-cp27mu-linux_x86_64.whl is not a supported wheel on this platform.
-> 这意味着 cp27
& linux
(显然是错误的平台)。
这里是 MacOS 的 wheel 文件:tensorflow-1.10.0-py2-none-any.whl
是1.10.0
版本,但可能满足依赖;相似安装:
python2 -m pip install tensorflow-1.10.0-py2-none-any.whl
在 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 找到,以便从源代码构建。
我在我的 CLion 上安装了 Bazel 插件并尝试导入一个新的 Bazel C++ 项目,但我一直遇到这些错误-
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
。我试过了
$ 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
.
有什么想法吗?
它显示为 tensorflow_gpu-1.8.0lft1-cp27-cp27mu-linux_x86_64.whl is not a supported wheel on this platform.
-> 这意味着 cp27
& linux
(显然是错误的平台)。
这里是 MacOS 的 wheel 文件:tensorflow-1.10.0-py2-none-any.whl
是1.10.0
版本,但可能满足依赖;相似安装:
python2 -m pip install tensorflow-1.10.0-py2-none-any.whl
在 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 找到,以便从源代码构建。