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.
- General Support
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 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 ).
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
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.
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:
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
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