Error when importing CoolProp in python

37 views
Skip to first unread message

Luuk den Toom

unread,
Dec 25, 2024, 3:07:11 PM12/25/24
to coolprop-users
Hi,

Due to a problem with Windows on my laptop I needed to reset my laptop and download a new image of windows 11. This also deleted all downloaded programs from my laptop, including Python and CoolProp.
During the download of CoolProp I got an error message (see the first 2 pictures attached) while building the wheels for CoolProp. I looked for a solution online and found that downloading Visual Studio Installer  (Microsoft C++ Build Tools) should fix the issue.  After downloading Visual Studio Installer I was able to download CoolProp, but now it gives an error when import CoolProp into a python file (see the 3rd picture attached).
I can't find any solutions online this time. Does somebody know how to fix this issue?

This is the Github link which stated that Visual Studio Installer should fix the problem:
https://stackoverflow.com/questions/64261546/how-to-solve-error-microsoft-visual-c-14-0-or-greater-is-required-when-inst 

I have also attached a picture with all installed packages and the corresponding versions.

Installed packages + versions.png
Picture 3 - import error.png
Picture 2 - download error.png
Picture 1 - download error.png

Chris N

unread,
Dec 26, 2024, 12:07:55 PM12/26/24
to coolprop-users
Just to double check. After getting the C++ dependency installed, when you ran the "pip install Coolprop", it reported no errors?

Luuk den Toom

unread,
Dec 26, 2024, 5:43:53 PM12/26/24
to coolprop-users
Yeah, after installing C++ the installation of CoolProp through 'pip install Coolprop' went fine and the list of downloaded packages also shows that Coolprop 6.6.0 has been installed.

Ian Bell

unread,
Dec 30, 2024, 2:38:05 PM12/30/24
to coolpro...@googlegroups.com
This is very strange, I can confirm the behavior though:

(py313) PS C:\Users\ian> pip install coolprop
Collecting coolprop
  Downloading CoolProp-6.6.0.tar.gz (14.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.0/14.0 MB 5.5 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: coolprop
  Building wheel for coolprop (pyproject.toml) ... done
  Created wheel for coolprop: filename=CoolProp-6.6.0-cp313-cp313-win_amd64.whl size=1629176 sha256=21192405f0ca9422ffeb78e0f4424f08234e38280687a2ba1cf477094e466d1d
  Stored in directory: c:\users\ian\appdata\local\pip\cache\wheels\01\44\36\e1e42f3bfc3b5aae8e6609ab58aaa33887d7770fc8baaab7da
Successfully built coolprop
Installing collected packages: coolprop
Successfully installed coolprop-6.6.0
(py313) PS C:\Users\ian> python
Python 3.13.1 | packaged by conda-forge | (main, Dec  5 2024, 21:02:16) [MSC v.1942 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import CoolProp
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    import CoolProp
  File "D:\Users\ian\miniforge3\envs\py313\Lib\site-packages\CoolProp\__init__.py", line 22, in <module>
    __fluids__ = CoolProp.get_global_param_string('fluids_list').split(',')
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "CoolProp.pyx", line 309, in CoolProp.CoolProp.get_global_param_string
  File "<stringsource>", line 15, in string.from_py.__pyx_convert_string_from_py_std__in_string
TypeError: expected bytes, str found

I thought we had resolved all these issues with bytes and str, but maybe something has changed in py 3.13 with that

--
You received this message because you are subscribed to the Google Groups "coolprop-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coolprop-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/coolprop-users/f318d421-7b5f-4f5d-9e2f-75e702e8854en%40googlegroups.com.

Ian Bell

unread,
Dec 30, 2024, 6:06:37 PM12/30/24
to coolpro...@googlegroups.com
I think something changed for python 3.13. I am not sure whether in cython or Python, but nevertheless, I believe I have fixed it. The next release will have updated wheels, but in the meantime, you can download the build artifact from github: https://github.com/CoolProp/CoolProp/actions/runs/12551565084/artifacts/2372700317 and then install the right wheel from that.

philosophiseover phiseover

unread,
Jun 12, 2025, 8:46:33 PMJun 12
to coolprop-users
  This is the place for all Zombie Catchers Mod APK lovers! 🎮
Get access to mod features like unlimited money, plutonium, and unlocked weapons. Ask questions, share your gameplay, or get help with installing the APK.
👉 Download the latest version here: https://zombiecatcherapk.com/
Reply all
Reply to author
Forward
0 new messages