英特尔 HPC 库:xgboost_activate.sh:16:= 未找到
Intel HPC Library : xgboost_activate.sh:16: = not found
我在我的 Debian 10 Buster amd64 上安装了带有 openAPI(英特尔 HPC 库)的 Conda:
$ whereis conda
conda: /opt/intel/oneapi/intelpython/python3.7/bin/conda /opt/intel/oneapi/intelpython/python3.7/condabin/conda
启动 $ conda activate
时出现以下错误:
/opt/intel/oneapi/intelpython/latest/etc/conda/deactivate.d/xgboost_deactivate.sh:16: = not found
/opt/intel/oneapi/intelpython/latest/etc/conda/activate.d/xgboost_activate.sh:16: = not found
我怀疑 bash 和 zsh SHELL 之间有错误(我使用 zsh
SHELL)。
如何解决这两个错误?
更新
以下是我在我的 Debian AMD64 上启动终端时的错误消息(zsh
SHELL):
:: initializing oneAPI environment ...
zsh: ZSH_VERSION = 5.7.1
:: advisor -- latest
:: ccl -- latest
:: clck -- latest
:: compiler -- latest
:: dal -- latest
:: debugger -- latest
:: dev-utilities -- latest
:: dnnl -- latest
:: dpcpp-ct -- latest
:: dpl -- latest
:: inspector -- latest
:: intelpython -- latest
/opt/intel/oneapi/intelpython/latest/etc/conda/activate.d/xgboost_activate.sh:16: = not found
:: ipp -- latest
:: ippcp -- latest
:: ipp -- latest
:: itac -- latest
:: mkl -- latest
:: mpi -- latest
:: tbb -- latest
:: vpl -- latest
:: vtune -- latest
:: oneAPI environment initialized ::
和文件 xgboost_activate.sh :
#!/bin/bash
#
# Copyright 2003-2021 Intel Corporation.
#
# This software and the related documents are Intel copyrighted materials, and
# your use of them is governed by the express license under which they were
# provided to you (License). Unless the License provides otherwise, you may
# not use, modify, copy, publish, distribute, disclose or transmit this
# software or the related documents without Intel's prior written permission.
#
# This software and the related documents are provided as is, with no express
# or implied warranties, other than those that are expressly stated in the
# License.
#
if [ "${OCL_ICD_FILENAMES}" == "" ]
then
export OCL_ICD_FILENAMES_RESET=1
export OCL_ICD_FILENAMES=libintelocl.so
fi
默认情况下,这是 #!/bin/sh
,但它也不起作用。
(代表问题作者发布解决方案,以便将其移至答案space).
我最终通过放置双括号来与 zsh 兼容来修复:
if [[ "${OCL_ICD_FILENAMES}" == "" ]]
而不是:
if [ "${OCL_ICD_FILENAMES}" == "" ]
我在我的 Debian 10 Buster amd64 上安装了带有 openAPI(英特尔 HPC 库)的 Conda:
$ whereis conda
conda: /opt/intel/oneapi/intelpython/python3.7/bin/conda /opt/intel/oneapi/intelpython/python3.7/condabin/conda
启动 $ conda activate
时出现以下错误:
/opt/intel/oneapi/intelpython/latest/etc/conda/deactivate.d/xgboost_deactivate.sh:16: = not found
/opt/intel/oneapi/intelpython/latest/etc/conda/activate.d/xgboost_activate.sh:16: = not found
我怀疑 bash 和 zsh SHELL 之间有错误(我使用 zsh
SHELL)。
如何解决这两个错误?
更新
以下是我在我的 Debian AMD64 上启动终端时的错误消息(zsh
SHELL):
:: initializing oneAPI environment ...
zsh: ZSH_VERSION = 5.7.1
:: advisor -- latest
:: ccl -- latest
:: clck -- latest
:: compiler -- latest
:: dal -- latest
:: debugger -- latest
:: dev-utilities -- latest
:: dnnl -- latest
:: dpcpp-ct -- latest
:: dpl -- latest
:: inspector -- latest
:: intelpython -- latest
/opt/intel/oneapi/intelpython/latest/etc/conda/activate.d/xgboost_activate.sh:16: = not found
:: ipp -- latest
:: ippcp -- latest
:: ipp -- latest
:: itac -- latest
:: mkl -- latest
:: mpi -- latest
:: tbb -- latest
:: vpl -- latest
:: vtune -- latest
:: oneAPI environment initialized ::
和文件 xgboost_activate.sh :
#!/bin/bash
#
# Copyright 2003-2021 Intel Corporation.
#
# This software and the related documents are Intel copyrighted materials, and
# your use of them is governed by the express license under which they were
# provided to you (License). Unless the License provides otherwise, you may
# not use, modify, copy, publish, distribute, disclose or transmit this
# software or the related documents without Intel's prior written permission.
#
# This software and the related documents are provided as is, with no express
# or implied warranties, other than those that are expressly stated in the
# License.
#
if [ "${OCL_ICD_FILENAMES}" == "" ]
then
export OCL_ICD_FILENAMES_RESET=1
export OCL_ICD_FILENAMES=libintelocl.so
fi
默认情况下,这是 #!/bin/sh
,但它也不起作用。
(代表问题作者发布解决方案,以便将其移至答案space).
我最终通过放置双括号来与 zsh 兼容来修复:
if [[ "${OCL_ICD_FILENAMES}" == "" ]]
而不是:
if [ "${OCL_ICD_FILENAMES}" == "" ]