Shingrace的个人博客分享 http://blog.sciencenet.cn/u/Shingrace

博文

linux 系统 安装pyeemd

已有 3851 次阅读 2017-11-8 14:02 |个人分类:linux|系统分类:科研笔记

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),的用法




https://blog.sciencenet.cn/blog-669638-1084314.html

上一篇:linux-software install
下一篇:linux 普通用户python中import pyeemd失败
收藏 IP: 123.125.1.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (4 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-22 01:05

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部