手动安装python pywt包及遇到的问题,sklearn函数不能使用。

1、pywt的全名为pywavelets。所以找已安装的包,不要看pywt了,它叫pywavelets。(把我坑了几个小时)

导入使用时,却用import pywt

2、安装好了,发现函数不能使用。我也是。。。。

鼠标对准包pywt,高亮,按ctrl。进入定义文件。居然是空的,怪不得不能用。再去试试numpy,人家就是满满当当,正常的。

我得用啊。所以想到直接官网,下载源码。

 https://pywavelets.readthedocs.io/en/latest/index.html#

源码:https://github.com/PyWavelets/pywt

3、手动安装 pywt。我想总能行了吧。

解压,打开文件夹。按住shift,右键选项进入命令行。也可以用cd进入,但我喜欢这样。

E:\迅雷下载\pywt-master> python setup.py install

又报错了。。。。。。似乎环境不行,需要安装  Microsoft Visual C++ 14.0。(巨坑)

building 'c_wt' library
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++
Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

安装 Microsoft Visual  Studio 2017之后

,手动安装成功。

进入pywt看看

from sklearn.model_selection import ShuffleSplit

ShuffleSplit不能使用。升级版本吧

pip install --upgrade scikit-learn

conda update scikit-learn

猜你喜欢

转载自blog.csdn.net/fzf1996/article/details/89709769
今日推荐