1

I have Conda installed with openAPI (Intel HPC library) on my Debian 10 Buster amd64:

$ whereis conda
conda: /opt/intel/oneapi/intelpython/python3.7/bin/conda /opt/intel/oneapi/intelpython/python3.7/condabin/conda

When I launch $ conda activate I get the following errors:

/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

I suspect an error between bash and zsh SHELL (I use zsh SHELL).

How can I fix these two errors?

Update

Here are the error messages when I launch a terminal on my Debian AMD64 (with 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 ::

and the file 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

By default, this is #!/bin/sh but it doesn't wwork too.

halfer
  • 19,824
  • 17
  • 99
  • 186
  • What `#!` line do the `.sh` scripts use? Do you mean your `/bin/sh` points at `zsh`? – Peter Cordes Jun 09 '21 at 06:25
  • @PeterCordes . Thanks for your quick answer, I have added an **UPDATE** to show all the details –  Jun 09 '21 at 06:51
  • @PeterCordes . It doesn't seem to find the value of `OCL_ICD_FILENAMES` variable –  Jun 09 '21 at 06:54
  • That code looks normal. Is your /bin/bash actually zsh? If not, what does your "I use zsh" have to do with anything? Or you just mean the `SHELL` environment variable? Which this script doesn't appear to depend on. – Peter Cordes Jun 09 '21 at 07:27
  • 3
    Don't edit answers into questions. If you want to answer, click the "answer your own question" button and post an answer. (And if you want it to make sense to future readers, make sure you explain why zsh matters in a `#!/bin/bash` script. Did you set up your system so `bash` is actually `zsh`?) – Peter Cordes Jun 09 '21 at 13:01

1 Answers1

0

(Posted solution on behalf of the question author in order to move it to the answer space).

I finally fixed by putting double brackets to be compliant with zsh:

if [[ "${OCL_ICD_FILENAMES}" == "" ]]

instead of:

if [ "${OCL_ICD_FILENAMES}" == "" ]
halfer
  • 19,824
  • 17
  • 99
  • 186