Unable to resolve the name py.CoolProp.CoolProp.PropsSI. Message
Show older comments
I'm trying to use the CoolProp MATLAB wrapper for a project. I have python dowloaded and have followed the steps on the CoolProp website to have the wrapper installed correctly, but when i run the command
>> py.CoolProp.CoolProp.PropsSI('T','P',101325,'Q',0,'Water')
provided by CoolProp to check that the wrapper is working, I keep getting the Unable to resolve the name py.CoolProp.CoolProp.PropsSI message.
Can someone please provide some guidance? I've never used Python or a wrapper before so I have no idea what to try next.
1 Comment
Thom Thom
on 14 Nov 2020
Hi Anna,
i have/had the same issue with Coolprob and python.
Which Version of Matlab/Python/CoolProb do you have installed?
I tried different versions of python and cooprob and there are in fact some compability problems.
If the latest version doesn't work, try using an older one.
In my case the last (not latest) version of python 3.7 enviroment(i think it is 3.7.4 but I'm not sure) and coolprob version 6.2.1 (not 6.4.1) is working now. I'm using Matlab Version ist 9.9.0.1467703 (R2020b)
You can also check it out in your command window:
First type in:
>>pyversion
If everything is installed correctly, then this should occur:
version: '3.7'
executable: 'C:\Users\{ur_user_name}\AppData\Local\Programs\Python\Python3.7\python.exe'
library: 'C:\Users\{ur_user_name}\AppData\Local\Programs\Python\Python3.7\\python37.dll'
home: 'C:\Users\...\Python37'
isloaded: 0
If not, then simply add the location of python.exe :
>>pyversion C:\Users\{ur_user_name}\AppData\Local\Programs\Python\Python3.7\python.exe
Then copy and paste that into the command window :
>>[v,e] = pyversion; system([e,' -m pip install --user -U CoolProp==6.2.1'])
This is the link/code to install the version of coolprob automatically.
The most important thing is that you can change the version of CoolProb which will be installed. Simply replace the number 6.2.1 by a different version you would like to run.
Take a look on the website and figure out which version is the best for you!
To check, but no nessecary: In this path you can find the packeges of coolprob installed on you computer:
C:\Users\{ur_user_name}\AppData\Roaming\Python
There is a folder with the installed enviroment of python version 3.X . If you click on it, you should find the installed coolprob folders.
Hope I could help you out =)
Answers (0)
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!