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

Tensorflow Error - failed to map segment from shared object

y__sumanth
Beginner
1,398 Views

Hi,

I have installed tensorflow in Intel oneAPI server. It was showing the below error when i tried to use it.

Import error:  failed to map segment from shared object.

Thanks for the help. 

0 Kudos
8 Replies
ArunJ_Intel
Moderator
1,398 Views

Hey Sumanth,

 

By Intel oneAPI server do you mean "Intel OneAPI devcloud"?. If so we have tensorflow pre-installed in devcloud environment and is ready to be used without any installations. We could help you with the steps on how to use this if required.

If you are not using devcloud and using some other environment. Please let us know about your environment. Also as there are multiple ways to install tensorflow, please let us know how you are trying to install tensorflow and which step of the installation results in the error you had mentioned.

 

Thanks

Arun Jose

0 Kudos
y__sumanth
Beginner
1,398 Views

Hey Arun,

Thanks for replying. I am using intel one API devcloud. When i import tensorflow into my python file, it is showing the below error.

Import error:  failed to map segment from shared object. (If possible once look at the screenshot attached to the first post ).

 

 

0 Kudos
ArunJ_Intel
Moderator
1,398 Views

Hey Sumanth,

 

Devcloud  has the OneAPI AI kit preinstalled. So it comes with a conda environment named tensorflow. You can start using tensorflow in devcloud just by activating tensorflow environment by the below commands.

 

source /opt/intel/inteloneapi/setvars.sh  --force
conda activate tensorflow

 

0 Kudos
ArunJ_Intel
Moderator
1,398 Views

Hey Sumanth,

 

Have you tried out the steps provided ?. Do the resolve your issue.

 

Arun

0 Kudos
y__sumanth
Beginner
1,398 Views

Hey Arun,

No man, the problem is not solved even with the condo tensorflow environment. I am still getting the same error while importing tensorflow into python. 

Thanks,

Sumanth

0 Kudos
ArunJ_Intel
Moderator
1,398 Views

Hey Sumanth,

Could you please try out the steps provided below and let us know the status

1)Please verify if the python path (After activating tensorflow environment) is pointing to the python of the tensorflow environment. You could verify this by executing the below python code after activating your environment.

import sys
print(sys.executable)

This should be ideally give you the below result:
 

'/glob/development-tools/versions/oneapi/beta05/inteloneapi/intelpython/latest/envs/tensorflow/bin/python'

If it is pointing to a different path you should try explicitly  exporting python path of your tensorflow environment to  PATH environment variable.  As in the below example

export PATH=/glob/development-tools/versions/oneapi/beta05/inteloneapi/intelpython/latest/envs/tensorflow/bin/:$PATH

 

2)If the python path checked in step 1 is actually pointing to the correct path. and still you are getting the same error could you please try running the below command to upgrade and force reinstall tensorflow.

pip install tensorflow --upgrade --force-reinstall

 

 

Arun Jose

 

 

 

0 Kudos
ArunJ_Intel
Moderator
1,398 Views

Hey Sumanth,

 

Have you tried out the steps provided. Do they resolve your issue.

 

Arun Jose

0 Kudos
ArunJ_Intel
Moderator
1,398 Views

Hey Sumanth,

 

We are closing this case assuming your issue is resolved. Please feel free to raise a new thread in case of further issues.

 

Arun Jose

0 Kudos
Reply