SheffieldML / GPy

Gaussian processes framework in python
BSD 3-Clause "New" or "Revised" License
2.01k stars 558 forks source link

Error while importing #563

Closed blankjul closed 6 years ago

blankjul commented 6 years ago

I have two machines I am working on. On my mac everything works fine. On the hpcc of my university I am not able to run the same script. The following error message while importing GPy is shown:

ImportError: miniconda3/lib/python3.6/site-packages/GPy/util/linalg_cython.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _Py_ZeroStruct

uname -a
Linux dev-intel16-k80 2.6.32-696.3.2.el6.x86_64 #1 SMP Tue Jun 20 01:26:55 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

To reproduce the error I used a clean version of miniconda3 and executed pip install GPy to see if any side effects cause the problem. But I still run into the same error.

Traceback (most recent call last):
  File "test.py", line 1, in <module>
    import GPy
  File "miniconda3-clean/lib/python3.6/site-packages/GPy/__init__.py", line 6, in <module>
    from . import core
  File "miniconda3-clean/lib/python3.6/site-packages/GPy/core/__init__.py", line 8, in <module>
    from .gp import GP
  File "miniconda3-clean/lib/python3.6/site-packages/GPy/core/gp.py", line 8, in <module>
    from .. import likelihoods
  File "miniconda3-clean/lib/python3.6/site-packages/GPy/likelihoods/__init__.py", line 1, in <module>
    from .bernoulli import Bernoulli
  File "miniconda3-clean/lib/python3.6/site-packages/GPy/likelihoods/bernoulli.py", line 5, in <module>
    from ..util.univariate_Gaussian import std_norm_pdf, std_norm_cdf, derivLogCdfNormal, logCdfNormal
  File "miniconda3-clean/lib/python3.6/site-packages/GPy/util/__init__.py", line 5, in <module>
    from . import linalg
  File "miniconda3-clean/lib/python3.6/site-packages/GPy/util/linalg.py", line 15, in <module>
    from . import linalg_cython
ImportError: miniconda3-clean/lib/python3.6/site-packages/GPy/util/linalg_cython.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _Py_ZeroStruct
asn1crypto                0.22.0           py36h265ca7c_1
ca-certificates           2017.08.26           h1d4fec5_0
certifi                   2017.7.27.1      py36h8b7b77e_0
cffi                      1.10.0           py36had8d393_1
chardet                   3.0.4            py36h0f667ec_1
conda                     4.3.27           py36h2866c0b_0
conda-env                 2.6.0                h36134e3_1
cryptography              2.0.3            py36ha225213_1
decorator                 4.1.2                     <pip>
GPy                       1.8.4                     <pip>
idna                      2.6              py36h82fb2a8_1
libedit                   3.1                  heed3624_0
libffi                    3.2.1                h4deb6c0_3
libgcc-ng                 7.2.0                hcbc56d2_1
libstdcxx-ng              7.2.0                h24385c6_1
ncurses                   6.0                  h06874d7_1
numpy                     1.13.3                    <pip>
openssl                   1.0.2l               h9d1a558_3
paramz                    0.8.5                     <pip>
pip                       9.0.1            py36h30f8307_2
pycosat                   0.6.2            py36h1a0ea17_1
pycparser                 2.18             py36hf9f622e_1
pyopenssl                 17.2.0           py36h5cc804b_0
pysocks                   1.6.7            py36hd97a5b1_1
python                    3.6.2               hdfe5801_15
readline                  7.0                  hac23ff0_3
requests                  2.18.4           py36he2e5f8d_1
ruamel_yaml               0.11.14          py36ha2fb22d_2
scipy                     0.19.1                    <pip>
setuptools                36.5.0           py36he42e2e1_0
six                       1.10.0           py36hcac75e4_1
sqlite                    3.20.1               h6d8b0f3_1
tk                        8.6.7                h5979e9b_1
urllib3                   1.22             py36hbe7ace6_0
wheel                     0.29.0           py36he7f4e38_1
xz                        5.2.3                h2bcbf08_1
yaml                      0.1.7                h96e3832_1
zlib                      1.2.11               hfbfcf68_1

Any idea what might cause this error?

Thanks in advance, Julian

zhenwendai commented 6 years ago

With some searching on Internet, it seems that it might because the Python environment used to compile GPy is different from the Python environment used to run.

mzwiessele commented 6 years ago

Has this been resolved with the newest version of GPy?