CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Cantera Python error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 25, 2022, 13:56
Default Cantera Python error
  #1
New Member
 
priyesh kakka
Join Date: Jan 2018
Posts: 13
Rep Power: 8
kakkapriyesh is on a distinguished road
Hi all,

I am running AMD system on UBUNTU 20.2 and I faced the following error after successfully installing Cantera via Conda

Code:
import cantera
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/priyesh/anaconda3/envs/ct-env/lib/python3.9/site-packages/cantera/__init__.py", line 4, in <module>
from ._cantera import *
ImportError: libmkl_rt.so.2: cannot open shared object file: No such file or directory

I solved this issue by going to the cantera source code and changing "libmkl_rt.so.1" to "libmkl_rt.so.2"

I hope this helps.
kakkapriyesh is offline   Reply With Quote

Old   May 30, 2022, 16:26
Default
  #2
New Member
 
Brent Skabelund
Join Date: May 2022
Posts: 1
Rep Power: 0
Mighty Boulder is on a distinguished road
Where did you find the libmkl_rt.so? I have not been able to locate it...
Mighty Boulder is offline   Reply With Quote

Old   May 31, 2022, 11:47
Default
  #3
New Member
 
priyesh kakka
Join Date: Jan 2018
Posts: 13
Rep Power: 8
kakkapriyesh is on a distinguished road
I think you will have to find the installed dir, for me I installed it through Conda, so the installed directory was in the conda environment. The error will also throw the path at which the directory is missing, go to that path and search for "libmkl" only and not the complete thing (because the file name might have numbers at the end).

Hope this helps
kakkapriyesh is offline   Reply With Quote

Old   January 30, 2023, 14:23
Default
  #4
New Member
 
James
Join Date: Apr 2020
Posts: 1
Rep Power: 0
pdeforfree is on a distinguished road
Quote:
Originally Posted by kakkapriyesh View Post
Hi all,

I am running AMD system on UBUNTU 20.2 and I faced the following error after successfully installing Cantera via Conda

Code:
import cantera
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/priyesh/anaconda3/envs/ct-env/lib/python3.9/site-packages/cantera/__init__.py", line 4, in <module>
from ._cantera import *
ImportError: libmkl_rt.so.2: cannot open shared object file: No such file or directory

I solved this issue by going to the cantera source code and changing "libmkl_rt.so.1" to "libmkl_rt.so.2"

I hope this helps.
I had the same issue, where the error was for missing libmkl_rt.so.2 while libmkl_rt.so.1 existed in my anaconda3/envs/cantera/lib folder. Rather than editing the Cantera source code, adding a soft symbolic link did the trick: ln -s libmkl_rt.so.1 libmkl_rt.so.2.
pdeforfree is offline   Reply With Quote

Reply

Tags
cantera, error, python


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM.org] compile error in dynamicMesh and thermophysicalModels libraries NickG OpenFOAM Installation 3 December 30, 2019 00:21
DPM udf error haghshenasfard FLUENT 0 April 13, 2016 06:35
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh gschaider OpenFOAM Community Contributions 300 October 29, 2014 18:00
OpenFOAM without MPI kokizzu OpenFOAM Installation 4 May 26, 2014 09:17
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


All times are GMT -4. The time now is 01:33.