Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646
719 Discussions

Installing custom packages

barwi_intc
Employee
338 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
319 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.

 

Dinesh2
Beginner
149 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 

AthiraM_Intel
Moderator
304 Views

Hi,


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


Thanks.


AthiraM_Intel
Moderator
268 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


Reply