Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud
1625 Discussions

Installing custom packages

barwi_intc
Employee
1,061 Views

While importing certain packages like requests works just fine, how do I install and use seaborn? How can I use cell magic to display plots inline?

The following fails for me:

!pip install -U seaborn

import matplotlib.pyplot as plt

import seaborn as sns

 

Python cannot find seaborn. Similarly %matplotlib inline also fails. What can I use as a workaround?

0 Kudos
4 Replies
AthiraM_Intel
Moderator
1,042 Views

Hi,

 

Thanks for reaching out to us.

The error might be due to when we use ! in front of a Linux command, it will start a new terminal each time, so in this terminal your environment is not activated. 

You can follow any of the below workarounds provided.

Method 1: Start a Jupyter cell by using bash magic(%%bash). Now, export the correct python path and install the package.

Commands to be executed in the cell:-

%%bash

export PATH=/<python path>/:$PATH

pip install seaborn --user

pip install matplotlib --user

 

Method 2: Install the package from terminal

Step 1: Initialize the oneAPI environment

source /opt/intel/inteloneapi/setvars.sh

Step 2 : Activate the environment

conda activate <environment>

Step 3: Install seaborn and matplotlib in the environment

pip install seaborn --user

pip install matplotlib --user

 

Now, open the Jupyterlab on your browser and start the kernel.

Hopes this will resolve your issue. 

If the issue still persists please let us know, also share the error screenshots.

 

Thanks.

 

0 Kudos
Dinesh2
Beginner
872 Views

when i am trying to install tensorflow using "pip install tensorflow --user" command it fails and shows error at the end like shown below 

 

memory error :Please visit the forums at: https://software.intel.com/en-us/forums/intel-devcloud blah blah

 

How to fix this 

0 Kudos
AthiraM_Intel
Moderator
1,027 Views

Hi,


Could you please give us an update? Is your issue resolved?


Thanks.


0 Kudos
AthiraM_Intel
Moderator
991 Views

Hi,


We have not heard back from you, we would discontinue monitoring this issue. If you need further assistance, please post a new thread.


Thanks


0 Kudos
Reply