当前位置:网站首页>PyEMD安装及简单使用
PyEMD安装及简单使用
2022-04-23 05:43:00 【林仔520】
0. 安装
命令pip install PyEMD
存在问题,不建议使用,若用此命令安装,会报以下错误:
Looking in indexes: http://pypi.doubanio.com/simple/, http://mirrors.aliyun.com/pypi/simple/, https://pypi.tuna.tsinghua.edu.cn/simple/, http://pypi.mirrors.ustc.edu.cn/simple/
Collecting PyEMD
Using cached https://mirrors.bfsu.edu.cn/pypi/web/packages/c0/c5/7fea8e7a71cd026b30ed3c40e4c5ea13a173e28f8855da17e25271e8f545/pyemd-0.5.1.tar.gz (91 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy<2.0.0,>=1.9.0 in e:\python\anaconda3\envs\python37\lib\site-packages (from PyEMD) (1.21.2)
Building wheels for collected packages: PyEMD
Building wheel for PyEMD (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'E:\python\Anaconda3\envs\python37\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\DELL\\AppData\\Local\\Temp\\pip-install-n2jen2us\\pyemd_cfa6b7dfdd37404b8bbdb61120975e4e\\setup.py'"'"'; __file__='"'"'C:\\Users\\DELL\\AppData\\Local\\Temp\\pip-install-n2jen2us\\pyemd_cfa6b7dfdd37404b8bbdb61120975e4e\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\DELL\AppData\Local\Temp\pip-wheel-r07120sj'
cwd: C:\Users\DELL\AppData\Local\Temp\pip-install-n2jen2us\pyemd_cfa6b7dfdd37404b8bbdb61120975e4e\
Complete output (11 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pyemd
copying pyemd\__about__.py -> build\lib.win-amd64-3.7\pyemd
copying pyemd\__init__.py -> build\lib.win-amd64-3.7\pyemd
running build_ext
building 'pyemd.emd' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for PyEMD
Running setup.py clean for PyEMD
Failed to build PyEMD
Installing collected packages: PyEMD
Running setup.py install for PyEMD ... error
ERROR: Command errored out with exit status 1:
command: 'E:\python\Anaconda3\envs\python37\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\DELL\\AppData\\Local\\Temp\\pip-install-n2jen2us\\pyemd_cfa6b7dfdd37404b8bbdb61120975e4e\\setup.py'"'"'; __file__='"'"'C:\\Users\\DELL\\AppData\\Local\\Temp\\pip-install-n2jen2us\\pyemd_cfa6b7dfdd37404b8bbdb61120975e4e\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\DELL\AppData\Local\Temp\pip-record-s9ggc882\install-record.txt' --single-version-externally-managed --compile --install-headers 'E:\python\Anaconda3\envs\python37\Include\PyEMD'
cwd: C:\Users\DELL\AppData\Local\Temp\pip-install-n2jen2us\pyemd_cfa6b7dfdd37404b8bbdb61120975e4e\
Complete output (13 lines):
running install
E:\python\Anaconda3\envs\python37\lib\site-packages\setuptools\command\install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pyemd
copying pyemd\__about__.py -> build\lib.win-amd64-3.7\pyemd
copying pyemd\__init__.py -> build\lib.win-amd64-3.7\pyemd
running build_ext
building 'pyemd.emd' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Command errored out with exit status 1: 'E:\python\Anaconda3\envs\python37\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\DELL\\AppData\\Local\\Temp\\pip-install-n2jen2us\\pyemd_cfa6b7dfdd37404b8bbdb61120975e4e\\setup.py'"'"'; __file__='"'"'C:\\Users\\DELL\\AppData\\Local\\Temp\\pip-install-n2jen2us\\pyemd_cfa6b7dfdd37404b8bbdb61120975e4e\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\DELL\AppData\Local\Temp\pip-record-s9ggc882\install-record.txt' --single-version-externally-managed --compile --install-headers 'E:\python\Anaconda3\envs\python37\Include\PyEMD' Check the logs for full command output.
可以使用下面命令进行安装:
pip install EMD-signal
如果需要了解更多详细信息,请关注这个链接:PyEMD
1. 简单使用
(1). 导包
# 导入工具包
import numpy as np
from PyEMD import EEMD, EMD, Visualisation
import pylab as plt
(2). 定义信号
# Define signal
t = np.linspace(0, 1, 200)
s = np.cos(11*2*np.pi*t*t) + 6*t*t
(3). 对信号进行EMD处理
# Execute EMD on signal
IMF = EMD().emd(s,t)
N = IMF.shape[0]+1
(4). 绘图
# Plot results
plt.subplot(N,1,1)
plt.plot(t, s, 'r')
plt.title("Input signal: $S(t)=cos(22\pi t^2) + 6t^2$")
plt.xlabel("Time [s]")
for n, imf in enumerate(IMF):
plt.subplot(N,1,n+2)
plt.plot(t, imf, 'g')
plt.title("IMF "+str(n+1))
plt.xlabel("Time [s]")
plt.tight_layout()
plt.savefig('simple_example')
plt.show()
(5). 结果展示
版权声明
本文为[林仔520]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_37955704/article/details/124332974
边栏推荐
- 框架解析2.源码-登录认证
- Linear sieve method (prime sieve)
- 7-10 longest symmetric substring (25 points) (violence problem solution) C language
- 域内用户访问域外samba服务器用户名密码错误
- 提升Facebook触及率和互动率攻略 | 智能客服帮您抓住用户的心
- io.lettuce.core.RedisCommandExecutionException: ERR wrong number of arguments for ‘auth‘ command
- JVM family (4) -- memory overflow (OOM)
- Range of numbers (dichotomous classic template topic)
- mysql-触发器、存储过程、存储函数
- Contract lock loophole
猜你喜欢
Common protocols of OSI layer
opensips(1)——安装opensips详细流程
delete和truncate
JVM系列(3)——内存分配与回收策略
手动删除eureka上已经注册的服务
基于thymeleaf实现数据库图片展示到浏览器表格
Jiugong magic square - the 8th Lanqiao provincial competition - group C (DFS and comparison of all magic square types)
JVM系列(4)——内存溢出(OOM)
Pol / select / EPO
软件架构设计——软件架构风格
随机推荐
Map对象 map.get(key)
JS number capitalization method
提升Facebook触及率和互动率攻略 | 智能客服帮您抓住用户的心
Date增加天数
SQL注入
Package mall system based on SSM
The 8th Blue Bridge Cup 2017 - frog jumping cup
mysql-触发器、存储过程、存储函数
interviewter:介绍一下MySQL日期函数
2.devops-sonar安装
Object to map
JVM series (3) -- memory allocation and recycling strategy
基于thymeleaf实现数据库图片展示到浏览器表格
Duplicate key update in MySQL
Typescript interface & type rough understanding
Batch import of orange single micro service
图解HashCode存在的意义
PreparedStatement防止SQL注入
橙单微服务之批量导入
JSP语法及JSTL标签