Python3 wrapper, ImportError: CoolProp.cpython-36m-x86_64-linux-gnu.so:undefined symbol

1,245 views
Skip to first unread message

Anand Takawale

unread,
Mar 1, 2017, 9:41:19 AM3/1/17
to coolprop-users
I have debian(testing) 64bit with anaconda 4.3.0(with python 3) installed.

I have installed CoolProp by using following command


anand@euler:~$ pip install coolprop
Collecting coolprop
  Downloading CoolProp-6.0.0.tar.gz (6.6MB)
    100% |████████████████████████████████| 6.6MB 182kB/s
Building wheels for collected packages: coolprop
  Running setup.py bdist_wheel for coolprop ... done
  Stored in directory: /home/anand/.cache/pip/wheels/ab/cf/14/f69d19adcc31183f2ce7b16d2d651c6f025a74906fc133b889
Successfully built coolprop
Installing collected packages: coolprop
Successfully installed coolprop-6.0.0


But importing coolprop gives me this error

anand@euler:~$ python
Python 3.6.0 |Anaconda 4.3.0 (64-bit)| (default, Dec 23 2016, 12:22:00)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import CoolProp
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/anand/anaconda3/lib/python3.6/site-packages/CoolProp/__init__.py", line 16, in <module>
    from .CoolProp import AbstractState
ImportError: /home/anand/anaconda3/lib/python3.6/site-packages/CoolProp/CoolProp.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZTVNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEEE


Will anyone please help me with this?

Matthis Thorade

unread,
Mar 1, 2017, 9:47:57 AM3/1/17
to coolprop-users
Do you also have system python installed?
Is the error anything different if you use
python -m pip install coolprop
instead?
https://docs.python.org/3/installing/#work-with-multiple-versions-of-python-installed-in-parallel

Anand Takawale

unread,
Mar 1, 2017, 10:40:24 AM3/1/17
to coolprop-users
Thank you Matthis for you reply, here is what I get


anand@euler:~$ python -m pip install coolprop
Requirement already satisfied: coolprop in ./anaconda3/lib/python3.6/site-packages
anand@euler:~$ pip -V
pip 9.0.1 from /home/anand/anaconda3/lib/python3.6/site-packages (python 3.6)

My default python is python3 from anaconda(If I am not wrong), I also have python2 which came with the debian system.

Ian Bell

unread,
Mar 1, 2017, 10:49:29 AM3/1/17
to coolpro...@googlegroups.com
We don't have working manylinux wheels for python 3.6.  Can you use python 3.5?  Or force coolprop==6.1,which will do a build from source.  Those options should work I think.  We need to get the 3.6 manylinux wheels working.  You could also check out the sources and do a python setup.py install from wrappers/Python

Ian



--
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-users+unsubscribe@googlegroups.com.
To post to this group, send email to coolprop-users@googlegroups.com.
Visit this group at https://groups.google.com/group/coolprop-users.
For more options, visit https://groups.google.com/d/optout.

Anand Takawale

unread,
Mar 2, 2017, 9:37:54 AM3/2/17
to coolprop-users
Dear Ian,

Thank you for your reply.

After installing from source(git), I am still not able to import CoolProp

Here is what I did.

anand@euler:~/git/CoolProp/wrappers/Python$ sudo /home/anand/anaconda3/bin/python setup.py install
.
.
.
Installed /home/anand/anaconda3/lib/python3.6/site-packages/CoolProp-6.1.1.dev0-py3.6-linux-x86_64.egg
Processing dependencies for CoolProp==6.1.1.dev0
Finished processing dependencies for CoolProp==6.1.1.dev0
files removed
.
anand@euler
:~/git/CoolProp/wrappers/Python$ python
Python 3.6.0 |Anaconda 4.3.0 (64-bit)| (default, Dec 23 2016, 12:22:00)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import CoolProp
Traceback (most recent call last):
 
File "<stdin>", line 1, in <module>

 
File "/home/anand/git/CoolProp/wrappers/Python/CoolProp/__init__.py", line 5, in <module>
   
from . import constants
 
File "/home/anand/git/CoolProp/wrappers/Python/CoolProp/constants.py", line 5, in <module>
   
from . import _constants
ImportError: cannot import name '_constants'
>>> exit()

anand@euler
:~/git/CoolProp/wrappers/Python$ cd
anand@euler
:~$ python
Python 3.6.0 |Anaconda 4.3.0 (64-bit)| (default, Dec 23 2016, 12:22:00)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import CoolProp
Traceback (most recent call last):
 
File "<stdin>", line 1, in <module>

 
File "/home/anand/anaconda3/lib/python3.6/site-packages/CoolProp-6.1.1.dev0-py3.6-linux-x86_64.egg/CoolProp/__init__.py", line 5, in <module>
   
from . import constants
 
File "/home/anand/anaconda3/lib/python3.6/site-packages/CoolProp-6.1.1.dev0-py3.6-linux-x86_64.egg/CoolProp/constants.py", line 5, in <module>
   
from . import _constants
ImportError: /home/anand/anaconda3/lib/python3.6/site-packages/CoolProp-6.1.1.dev0-py3.6-linux-x86_64.egg/CoolProp/_constants.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZdlPvm
>>> exit()
 


PS: Thank you Ian for making CoolProp, its such a useful tool for doing research.



On Wednesday, March 1, 2017 at 4:49:29 PM UTC+1, Ian Bell wrote:
We don't have working manylinux wheels for python 3.6.  Can you use python 3.5?  Or force coolprop==6.1,which will do a build from source.  Those options should work I think.  We need to get the 3.6 manylinux wheels working.  You could also check out the sources and do a python setup.py install from wrappers/Python

Ian


On Wed, Mar 1, 2017 at 8:40 AM, Anand Takawale <anand.t...@gmail.com> wrote:
Thank you Matthis for you reply, here is what I get


anand@euler:~$ python -m pip install coolprop
Requirement already satisfied: coolprop in ./anaconda3/lib/python3.6/site-packages
anand@euler:~$ pip -V
pip 9.0.1 from /home/anand/anaconda3/lib/python3.6/site-packages (python 3.6)

My default python is python3 from anaconda(If I am not wrong), I also have python2 which came with the debian system.


On Wednesday, March 1, 2017 at 3:47:57 PM UTC+1, Matthis Thorade wrote:
Do you also have system python installed?
Is the error anything different if you use
python -m pip install coolprop
instead?
https://docs.python.org/3/installing/#work-with-multiple-versions-of-python-installed-in-parallel

--
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 post to this group, send email to coolpro...@googlegroups.com.

Jorrit Wronski

unread,
Mar 2, 2017, 1:09:15 PM3/2/17
to coolpro...@googlegroups.com

Hi, you cannot import the package in the source directory. Change the directory before you import the package and it should work.

Jorrit

-- 
Jorrit Wronski
Senior R&D Engineer, M.Sc., Ph.D.
______________________________________________________
IPU Refrigeration and Energy Technology
Akademivej 358, Room 129
2800 Kgs. Lyngby, Denmark


From: coolpro...@googlegroups.com [coolpro...@googlegroups.com] on behalf of Anand Takawale [anand.t...@gmail.com]
Sent: 02 March 2017 15:37
To: coolprop-users
Subject: Re: [coolprop-users] Re: Python3 wrapper, ImportError: CoolProp.cpython-36m-x86_64-linux-gnu.so:undefined symbol

Anand Takawale

unread,
Mar 2, 2017, 2:39:45 PM3/2/17
to coolprop-users, jo...@ipu.dk
Hello Jorrit,

Changing directory does not help as posted in above when I try to import in my home directory.

I get


ImportError: /home/anand/anaconda3/lib/python3.6/site-packages/CoolProp-6.1.1.dev0-py3.6-linux-x86_64.egg/CoolProp/_constants.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZdlPvm

To post to this group, send email to coolpr...@googlegroups.com.

Matt Yates

unread,
Mar 2, 2017, 4:45:20 PM3/2/17
to coolpro...@googlegroups.com, jo...@ipu.dk
I got this to install (on Debian Jessie using latest Anaconda), through the following:

As root, make sure the following are installed:

apt-get install cmake git g++ p7zip libpython-dev

As normal user, make sure the following are installed:

pip install six Cython

Then get the latest version of CoolProp and compile:

cd ~/anaconda3/
git clone https://github.com/CoolProp/CoolProp --recursive 
cd CoolProp/wrappers/python
python setup.py install --user

After that, this is what I get from my jupyter notebook:

import sys
print(sys.version)

Output:

3.6.0 |Anaconda custom (64-bit)| (default, Dec 23 2016, 12:22:00)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]

And from this:

import CoolProp
print(CoolProp.__version__)

Output:

6.1.1dev

To unsubscribe from this group and stop receiving emails from it, send an email to coolprop-users+unsubscribe@googlegroups.com.
To post to this group, send email to coolprop-users@googlegroups.com.

Anand Takawale

unread,
Mar 3, 2017, 10:31:26 AM3/3/17
to coolprop-users, jo...@ipu.dk
Dear Matt,

Thanks for your reply. I still have the same issue, seems like its only with debian strech, as you mentioned in Jessie its working fine.

Anand Takawale

unread,
Mar 3, 2017, 12:41:49 PM3/3/17
to coolprop-users, jo...@ipu.dk
Hello All,

Got it working with the help of anaconda cloud. https://anaconda.org/bryanwweber/coolprop

Thank you for all your help, I should have searched more thoroughly before posting it here and bothering you guys.

Thank you again.

Dietrich Pescoller

unread,
Jul 24, 2017, 11:38:26 AM7/24/17
to coolprop-users, jo...@ipu.dk
I had the exact same issue. I did some google search, and I was redirected to this discussion, and in no time I was able to fix the issue...
so for me was useful Thanks!
Reply all
Reply to author
Forward
0 new messages