Reputation: 941
Today, I'm wondering what the difference between Conda in oneAPI and Conda in Anaconda is and how to use the oneAPI in the right way to get the maximum usage of the latest Intel Core gen 12.
After installing oneAPI, they also contain conda. However, I cannot use this as a normal condition when:
-It does not contain conda-build and several packages like normal conda in Anaconda.
-Can not create as well as clone other environments from the "base" of Conda OneAPI. If I clone the "base" to the new one as conda create --name new_env --clone base
and then activate the "new_env", I cannot use Conda anymore and it warns me like the conda does not exist. The warning is as below.
'conda' is not recognized as an internal or external command.
operable program or batch file.
However, training any DNN model on conda oneAPI is faster than on conda in Anaconda by 30%, and it also has better performance in the data preprocessing tasks. I really want to always use the advantage of Python in the Conda OneAPI environment as normal Conda in Anaconda. So, how to merge them into one to make it easier to use, or how to fix the problem of Conda environment of oneAPI toolkit
Upvotes: 5
Views: 2505
Reputation: 1900
I had this problem too, after cloning base environment in oneAPI, conda disappears from path on Windows 10 and calling setvars.bat doesn't help. Try to open Intel oneAPI command prompt for Intel 64 for Visual Studio 2019 (or other appropriate cmd installed with oneAPI) and manually add path to conda (make sure that you have conda.exe in below dir)
set PATH=%PATH%;"C:\Program Files (x86)\Intel\oneAPI\intelpython\python3.9\Scripts"
Then run conda init
and reopen same command prompt.
One more recomendation is to open oneAPI command prompt as Administrator if you plan to clone envs or install packages.
Upvotes: 0
Reputation: 69
Conda executable in one api does not support all the features supported by conda in anaconda.
Conda executable in one api can be used to download both intel optimized packages as well as anaconda packages.
Conda executable in one api gives performance improvement for intel optimized packages.
Since setvars is not sourced you are getting this warning
'conda' is not recognized as an internal or external command.
operable program or batch file.
Using Intel Conda Packages with Continuum's Python: If you want to install Intel packages into an environment with Continuum's python, do not add the "intel" channel to your configuration file because that will cause all your Continuum packages to be replaced with Intel builds, if available. Rather, specify the "intel" channel on the command line with "-c intel" parameter and the "--no-update-deps" flag to avoid switching other packages, such as python itself, to Intel's builds.
Use the following command to install intel optimized packages using conda executable in one api:
conda install "Package_name" -c intel --no-update-deps here Package_name can be(mkl,numpy..)
Available Intel packages can be viewed here: https://anaconda.org/intel/packages
conda install numpy -c intel --no-update-deps
Upvotes: 1