AI Tools from Intel
Find answers to your toolkit installation, configuration, and get-started questions.

Cannot upgrade Python with Conda Package Manager on Ubuntu 22.04

bredsj
Novice
2,343 Views

I have installed oneAPI with AI toolkits and work mainly in Fortran combined with Python. In the Conda base environment I could update Python to version=5.4.3 but when I select the intelenv it shows that an update is available but nothings happen when I update.

I have done the following from ~/anaconda3/bin

conda init

anaconda-navigator

and then in the navigator selected the intelenv, etc

 

When I try the terminal the following happens

steph@+++++:$ conda update anaconda

PackageNotInstalledError: Package is not installed in prefix.
prefix: /opt/intel/oneapi/intelpython/latest
package name: anaconda

steph@+++++:$

 

Any assistance would be appreciated.

 

 

 

0 Kudos
14 Replies
DiyaN_Intel
Moderator
2,277 Views

Hi.


Thank you for posting in Intel Communities.

We are working on this internally and get back to you with an update soon.


Regards,

Diya


0 Kudos
Vasudha_Intel
Moderator
2,204 Views

Hello @bredsj, could you please try conda update --all and let us know if it works for you?

0 Kudos
bredsj
Novice
2,183 Views

Please see result below, to confirm; I use Ubuntu 22.03 LTS, the first batch of feedback is what is loaded per session, then the command and the feedback. Because Intel is by default installed in /opt administrative rights (i.e. SUDO) is required. When SUDO is used the local rights are overridden, or at least it is my understanding.

 

thanks for 

 

:: initializing oneAPI environment ...
bash: BASH_VERSION = 5.1.16(1)-release
args: Using "$@" for setvars.sh arguments:
:: 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
:: ipp -- latest
:: ippcp -- latest
:: itac -- latest
:: mkl -- latest
:: modelzoo -- latest
:: modin -- latest
:: mpi -- latest
:: neural-compressor -- latest
:: pytorch -- latest
:: tbb -- latest
:: tensorflow -- latest
:: vpl -- latest
:: vtune -- latest
:: oneAPI environment initialized ::

steph@sjb-pc:$ conda update --all
Retrieving notices: ...working... done
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

environment location: /opt/intel/oneapi/intelpython/latest


The following packages will be downloaded:

package | build
---------------------------|-----------------
libabseil-20230125.3 | cxx17_h59595ed_1 1.2 MB file:///opt/intel/oneapi/conda_channel
libblas-3.9.0 |17_linux64_openblas 13 KB file:///opt/intel/oneapi/conda_channel
libcblas-3.9.0 |17_linux64_openblas 13 KB file:///opt/intel/oneapi/conda_channel
libgfortran-ng-13.1.0 | h69a702a_0 22 KB file:///opt/intel/oneapi/conda_channel
libgfortran5-13.1.0 | h15d22d2_0 1.8 MB file:///opt/intel/oneapi/conda_channel
liblapack-3.9.0 |17_linux64_openblas 13 KB file:///opt/intel/oneapi/conda_channel
libopenblas-0.3.23 |pthreads_h80387f5_0 9.4 MB file:///opt/intel/oneapi/conda_channel
libprotobuf-4.23.3 | hd1fb520_0 2.9 MB file:///opt/intel/oneapi/conda_channel
libstdcxx-ng-13.1.0 | hfd8a6a1_0 4.7 MB file:///opt/intel/oneapi/conda_channel
scipy-1.10.1 | py39h6183b62_3 18.4 MB file:///opt/intel/oneapi/conda_channel
------------------------------------------------------------
Total: 38.5 MB

The following NEW packages will be INSTALLED:

libblas conda_channel/linux-64::libblas-3.9.0-17_linux64_openblas
libcblas conda_channel/linux-64::libcblas-3.9.0-17_linux64_openblas
liblapack conda_channel/linux-64::liblapack-3.9.0-17_linux64_openblas
libopenblas conda_channel/linux-64::libopenblas-0.3.23-pthreads_h80387f5_0

The following packages will be UPDATED:

libabseil 20230125.2-cxx17_h59595ed_2 --> 20230125.3-cxx17_h59595ed_1
libgfortran-ng 12.2.0-h69a702a_19 --> 13.1.0-h69a702a_0
libgfortran5 12.2.0-h337968e_19 --> 13.1.0-h15d22d2_0
libprotobuf 4.23.2-hd1fb520_5 --> 4.23.3-hd1fb520_0
libstdcxx-ng 12.2.0-h46fd767_19 --> 13.1.0-hfd8a6a1_0
scipy 1.10.1-py39he5fd122_0 --> 1.10.1-py39h6183b62_3


Proceed ([y]/n)?

 

Downloading and Extracting Packages

Preparing transaction: done
Verifying transaction: failed

EnvironmentNotWritableError: The current user does not have write permissions to the target environment.
environment location: /opt/intel/oneapi/intelpython/latest
uid: 1000
gid: 1000

 

0 Kudos
Vasudha_Intel
Moderator
2,118 Views

Yes, SUDO is required. 

0 Kudos
Vasudha_Intel
Moderator
2,034 Views

Hello @bredsj, could you confirm if you have any further queries or concerns that require clarification? If not, we will proceed to close this issue.

0 Kudos
bredsj
Novice
2,022 Views

Good day

 

I have tried sudo conda update --all see result below:

steph@sjb-pc:$ sudo conda update --all
[sudo] password for steph:
sudo: conda: command not found
steph@sjb-pc:$

 

 

0 Kudos
Vasudha_Intel
Moderator
1,953 Views

After installing the oneAPI AI Toolkits, If you need to update or install packages to the Intel environment consider cloning them to a separate environment first. This separation helps manage dependencies and avoids conflicts with existing installations. You can then make changes and test them in the cloned environment.

 

Also, the tools in the oneAPI toolkits are configured via environment variables. Set up your environment by sourcing the setvars script. You can find the setvars.sh script in the root folder of your oneAPI installation, which is typically /opt/intel/oneapi/

0 Kudos
Vasudha_Intel
Moderator
1,826 Views

Hi, could you please confirm whether the approach of making changes and testing them in the cloned environment worked for you?


0 Kudos
bredsj
Novice
1,803 Views

No, I am not really sure what to do with cloning. I have already shown in one of my previous posts how the variables are set/sourced automatically through .bash.rc, again shown below for convenience.

0 Kudos
Vasudha_Intel
Moderator
1,759 Views

Hi, thanks for replying, according to your issue you were successfully able to update Python in the Conda base environment however it was not updated within the intel environment. Please correct, if my understanding is incorrect.


0 Kudos
Vasudha_Intel
Moderator
1,489 Views

Hi bresj,


There might not be write permissions for the pre-installed environments hence you could face this issue "EnvironmentNotWritableError".


These are a few commands to create new environments in the user directory so that you can install any other packages without any issues. This is a workaround for intel-aikit-pytorch environment.

 

Step 1: Clone the pre-install environment in a separate environment.

conda create -n aikit-pt -c intel intel-aikit-pytorch


Step 2: Activate the respective environment.

conda activate aikit-pt


Step 3: Update

conda update --all

 

Similarly, you can work with other pre-installed, environments.


0 Kudos
Vasudha_Intel
Moderator
1,328 Views

Hi @bredsj,

Could you please confirm if the steps provided resolved your issue or if you're still experiencing any difficulties?


0 Kudos
Vasudha_Intel
Moderator
1,027 Views

Hi @bredsj, we are closing this issue, if you face any other issues, please feel free to open another ticket, Thanks.


0 Kudos
bredsj
Novice
984 Views

 Thank you, noted and thanks for your assistance, the cloning didn't work. If I do find a solution I'll post it.

 

 

0 Kudos
Reply