如何解决PyNIO和SciPy之间的冲突

时间:2016-05-11 15:34:48

标签: python scipy nio gfortran glib

我在Linux系统中安装了PyNIO:

$ conda install libnetcdf netcdf4 hdf5 jpeg libgfortran gcc libgcc xray --name=PyNIO
$ hash gcc
$ which gcc
~/.conda/envs/PyNIO/bin/gcc
$ hash gfortran
$ which gfortran
~/.conda/envs/PyNIO/bin/gfortran

$ curl -L https://github.com/NCAR/pynio/archive/master.zip [ github.com/NCAR/pynio/archive/master.zip ] > pynio-master.zip
$ unzip pynio-master.zip && cd pynio-master

$ export PATH=~/.conda/envs/PyNIO/bin:$PATH
$ python setup.py build

为了在你的conda环境中的库或系统中包含的库中构建PyNIO,然后:

$ python setup.py install
$ cd ~

运行:

$ ldd ~/.conda/envs/PyNIO/lib/python2.7/site-packages/PyNIO/nio.so

路径为:

linux-vdso.so.1 =>  (0x00007fff1373f000)
libjpeg.so.8 => /home/takaya/.conda/envs/PyNIO/lib/libjpeg.so.8 (0x00007f211f829000)
libpng16.so.16 => /home/takaya/.conda/envs/PyNIO/lib/libpng16.so.16 (0x00007f211f5e6000)
libz.so.1 => /home/takaya/.conda/envs/PyNIO/lib/libz.so.1 (0x00007f211f3d0000)
libnetcdf.so.7 => /home/takaya/.conda/envs/PyNIO/lib/libnetcdf.so.7 (0x00007f211c05d000)
libgfortran.so.3 => /home/takaya/.conda/envs/PyNIO/lib/libgfortran.so.3 (0x00007f211bd36000)
libpython2.7.so.1.0 => /home/takaya/.conda/envs/PyNIO/lib/libpython2.7.so.1.0 (0x00007f211b94f000)
libstdc++.so.6 => /home/takaya/.conda/envs/PyNIO/lib/libstdc++.so.6 (0x00007f211b639000)
libm.so.6 => /lib64/libm.so.6 (0x00007f211b31a000)
libgcc_s.so.1 => /home/takaya/.conda/envs/PyNIO/lib/libgcc_s.so.1 (0x00007f211b104000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f211aee8000)
libc.so.6 => /lib64/libc.so.6 (0x00007f211ab26000)
libssl.so.1.0.0 => /home/takaya/.conda/envs/PyNIO/lib/./libssl.so.1.0.0 (0x00007f211a8b0000)
libcrypto.so.1.0.0 => /home/takaya/.conda/envs/PyNIO/lib/./libcrypto.so.1.0.0 (0x00007f211a479000)
librt.so.1 => /lib64/librt.so.1 (0x00007f211a271000)
libhdf5_hl.so.10 => /home/takaya/.conda/envs/PyNIO/lib/./libhdf5_hl.so.10 (0x00007f211a053000)
libhdf5.so.10 => /home/takaya/.conda/envs/PyNIO/lib/./libhdf5.so.10 (0x00007f2119b9c000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f2119997000)
libcurl.so.4 => /home/takaya/.conda/envs/PyNIO/lib/./libcurl.so.4 (0x00007f2119738000)
libquadmath.so.0 => /home/takaya/.conda/envs/PyNIO/lib/./libquadmath.so.0 (0x00007f21194fc000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007f21192f8000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2120002000)

在我的系统上激活Python并运行后:

$ python
>>> import Nio
>>> Nio.__version__
'1.5.0-beta'

因此似乎安装了PyNIO。但是,SciPy现在似乎与我安装的PyNIO发生冲突。在JuPyter笔记本上从SciPy导入插值模块:

from scipy import interpolate as naiso

给出错误:

ImportError: /home/takaya/.conda/envs/PyNIO/lib/python2.7/site-packages/zmq/backend/cython/../../../../.././libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/takaya/.conda/envs/PyNIO/lib/python2.7/site-packages/scipy/sparse/_sparsetools.so)

有人知道如何解决这个问题吗?提前谢谢。

0 个答案:

没有答案