||
linux 下
安装gsl(libeemd的依赖包)
wget http://mirrors.ustc.edu.cn/gnu/gsl/gsl-2.4.tar.gz
cd gsl-2.4
./configure
make
make install
安装libeemd
wget https://bitbucket.org/luukko/libeemd/get/4aaaea9bbc52.zip
cd luukko-libeemd-4aaaea9bbc52/
make
安装pyeemd
wget https://bitbucket.org/luukko/pyeemd/get/bfc6a5873741.zip
unzip bfc6a5873741.zip
cd luukko-pyeemd-bfc6a5873741/
python3 setup.py install --user
进入python,出错,如下:
>>> import pyeemd
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/root/.local/lib/python3.6/site-packages/pyeemd-1.4-py3.6.egg/pyeemd/__init__.py", line 21, in <module>
from .pyeemd import eemd, ceemdan, emd, emd_find_extrema, emd_num_imfs, emd_evaluate_spline
File "/root/.local/lib/python3.6/site-packages/pyeemd-1.4-py3.6.egg/pyeemd/pyeemd.py", line 57, in <module>
_libeemd = _init()
File "/root/.local/lib/python3.6/site-packages/pyeemd-1.4-py3.6.egg/pyeemd/pyeemd.py", line 53, in _init
return ctypes.CDLL(lib)
File "/root/anaconda3/lib/python3.6/ctypes/__init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libeemd.so.1.4.1: cannot open shared object file: No such file or directory
最后一句表示系统不知道libeemd.so文件在哪,即应该在/etc/lb.so.conf文件中加入:
/usr/local/lib
即做以下修改:
cd etc
vi ld.so.conf
文件修改为:
【
include ld.so.conf.d/*.conf
/usr/local/lib
~ 】
退出后
>>ldconfig
更新一下才生效
这样就可以在python 中import pyeemd
可以查询help(pyeemd.eemd),的用法
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-9-19 16:08
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社