WSI 病理图像预处理(python)安装spams (失败)

1、尝试方法1

使用python对WSI(病理图像)进行预处理的时候,使用颜色标准化工具需要spams

但是使用pip install 安装很可能会出现失败。pip install spams 失败;这时采用python setup.py install
又报错了
在这里插入图片描述
No module named ‘numpy.distutils._msvccompiler’ in numpy.distutils; trying from distutils

根据这篇博客:link.
我下载安装了Visual Studio 生成工具 2019
链接: link.
现在正在安装
真的安装了好久
安装好了!然后我这个傻子直接点了重启!神奇的是重启完之后这篇文章还在~没有白记录
踩坑记录!
emmmm并没有用

2、尝试方法2

后来我一想是不是因为我本来安装的VS2015?
下载链接: link.
在这里插入图片描述
在这里插入图片描述
额还是不行, 这时候我已经疯了…

3、尝试方法3

参考文章: link.
结果…
在这里插入图片描述
找到这么多,我也不知道是哪个文件夹就都给添加进去了;
试了一下放在第一个文件夹是对的.
在这里插入图片描述
在这里插入图片描述
结果安装文件又报错了
参考文章: link.

还是报错,心累…

4、尝试方法4

根据这篇文章:link
下载安装gcc,g++编译器
在这里插入图片描述
接着点:link

这里在这里插入图片描述
换了好几遍还是失败了.
重启pycharm可以 ~
在这里插入图片描述
在setup.py中插入以下代码:

import os
from distutils.sysconfig import get_config_vars
(opt,) = get_config_vars('OPT')
os.environ['OPT'] = " ".join(
    flag for flag in opt.split() if flag != '-Wstrict-prototypes'
)

额…没有用

running install
running build
running build_py
running build_ext
building '_spams_wrap' extension
C compiler: gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypes
compile options: '-D__MSVCRT_VERSION__=0x1916 -I. -Ispams\linalg -Ispams\prox -Ispams\decomp -Ispams\dictLearn -IC:\4Software\Anaconda3\envs\tf\lib
\site-packages\numpy\core\include -IC:\4Software\Anaconda3\envs\tf\include -IC:\4Software\Anaconda3\Library\include -IC:\4Software\Anaconda3\envs\t
f\include -IC:\4Software\Anaconda3\envs\tf\include -IC:\4Software\Anaconda3\envs\tf\include -c'
extra options: '-DNDEBUG -DUSE_BLAS_LIB -fPIC -fopenmp -Wunused-variable -m64'
gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypes -D__MSVCRT_VERSION__=0x1916 -I. -Ispams\linalg -Ispams\prox -Ispams\decomp -Ispams\dictLear
n -IC:\4Software\Anaconda3\envs\tf\lib\site-packages\numpy\core\include -IC:\4Software\Anaconda3\envs\tf\include -IC:\4Software\Anaconda3\Library\i
nclude -IC:\4Software\Anaconda3\envs\tf\include -IC:\4Software\Anaconda3\envs\tf\include -IC:\4Software\Anaconda3\envs\tf\include -c spams_wrap.cpp
 -o build\temp.win-amd64-3.8\Release\spams_wrap.o -DNDEBUG -DUSE_BLAS_LIB -fPIC -fopenmp -Wunused-variable -m64
cc1plus.exe: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
cc1plus.exe: sorry, unimplemented: 64-bit mode not compiled in
error: Command "gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypes -D__MSVCRT_VERSION__=0x1916 -I. -Ispams\linalg -Ispams\prox -Ispams\decomp
-Ispams\dictLearn -IC:\4Software\Anaconda3\envs\tf\lib\site-packages\numpy\core\include -IC:\4Software\Anaconda3\envs\tf\include -IC:\4Software\Ana
conda3\Library\include -IC:\4Software\Anaconda3\envs\tf\include -IC:\4Software\Anaconda3\envs\tf\include -IC:\4Software\Anaconda3\envs\tf\include -
c spams_wrap.cpp -o build\temp.win-amd64-3.8\Release\spams_wrap.o -DNDEBUG -DUSE_BLAS_LIB -fPIC -fopenmp -Wunused-variable -m64" failed with exit s
tatus 1

想知道怎么安装啊啊啊啊啊

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值