Cython编译文件出错
报错信息:
(rpc) stu@amax:~/segment/dss_crf$ python setup.py install
Compiling pydensecrf/eigen.pyx because it changed.
Compiling pydensecrf/densecrf.pyx because it changed.
[1/2] Cythonizing pydensecrf/densecrf.pyx
/home/stu/anaconda3/envs/rpc/lib/python3.6/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /home/stu03/kdy/rpc/segment/dss_crf/pydensecrf/densecrf.pxdtree = Parsing.p_module(s, pxd, full_module_name)Error compiling Cython file:
------------------------------------------------------------
...
from eigen cimport *
^
------------------------------------------------------------pydensecrf/densecrf.pxd:1:0: 'eigen.pxd' not foundError compiling Cython file:
------------------------------------------------------------
...cdef cppclass PottsCompatibility(LabelCompatibility):PottsCompatibility(float) except +cdef cppclass DiagonalCompatibility(LabelCompatibility):DiagonalCompatibility(const c_VectorXf&) except +^
------------------------------------------------------------pydensecrf/densecrf.pxd:12:36: 'c_VectorXf' is not a type identifierError compiling Cython file:
------------------------------------------------------------
...cdef cppclass DiagonalCompatibility(LabelCompatibility):DiagonalCompatibility(const c_VectorXf&) except +cdef cppclass MatrixCompatibility(LabelCompatibility):MatrixCompatibility(const c_MatrixXf&) except +^
------------------------------------------------------------pydensecrf/densecrf.pxd:15:34: 'c_MatrixXf' is not a type identifierError compiling Cython file:
------------------------------------------------------------
...
cdef extern from "densecrf/include/unary.h":cdef cppclass UnaryEnergy:passcdef cppclass ConstUnaryEnergy(UnaryEnergy):ConstUnaryEnergy(const c_MatrixXf& unary) except +^
------------------------------------------------------------pydensecrf/densecrf.pxd:23:31: 'c_MatrixXf' is not a type identifierError compiling Cython file:
------------------------------------------------------------
...cdef cppclass ConstUnaryEnergy(UnaryEnergy):ConstUnaryEnergy(const c_MatrixXf& unary) except +cdef cppclass LogisticUnaryEnergy(UnaryEnergy):LogisticUnaryEnergy(const c_MatrixXf& L, const c_MatrixXf& feature) except +^
------------------------------------------------------------pydensecrf/densecrf.pxd:26:34: 'c_MatrixXf' is not a type identifierError compiling Cython file:
------------------------------------------------------------
...cdef cppclass ConstUnaryEnergy(UnaryEnergy):ConstUnaryEnergy(const c_MatrixXf& unary) except +cdef cppclass LogisticUnaryEnergy(UnaryEnergy):LogisticUnaryEnergy(const c_MatrixXf& L, const c_MatrixXf& feature) except +^
------------------------------------------------------------pydensecrf/densecrf.pxd:26:55: 'c_MatrixXf' is not a type identifierError compiling Cython file:
------------------------------------------------------------
...c_DenseCRF(int N, int M) except +# Setup methods.# TODO#void addPairwiseEnergy(PairwisePotential *potential)void addPairwiseEnergy(const c_MatrixXf &features, LabelCompatibility*, KernelType, NormalizationType)^
------------------------------------------------------------pydensecrf/densecrf.pxd:54:37: 'c_MatrixXf' is not a type identifierError compiling Cython file:
------------------------------------------------------------
...# Setup methods.# TODO#void addPairwiseEnergy(PairwisePotential *potential)void addPairwiseEnergy(const c_MatrixXf &features, LabelCompatibility*, KernelType, NormalizationType)void setUnaryEnergy(UnaryEnergy *unary)void setUnaryEnergy(const c_MatrixXf &unary)^
------------------------------------------------------------pydensecrf/densecrf.pxd:56:34: 'c_MatrixXf' is not a type identifierError compiling Cython file:
------------------------------------------------------------
...# TODO#void addPairwiseEnergy(PairwisePotential *potential)void addPairwiseEnergy(const c_MatrixXf &features, LabelCompatibility*, KernelType, NormalizationType)void setUnaryEnergy(UnaryEnergy *unary)void setUnaryEnergy(const c_MatrixXf &unary)void setUnaryEnergy(const c_MatrixXf &L, const c_MatrixXf &feature)^
------------------------------------------------------------pydensecrf/densecrf.pxd:57:34: 'c_MatrixXf' is not a type identifierError compiling Cython file:
------------------------------------------------------------
...# TODO#void addPairwiseEnergy(PairwisePotential *potential)void addPairwiseEnergy(const c_MatrixXf &features, LabelCompatibility*, KernelType, NormalizationType)void setUnaryEnergy(UnaryEnergy *unary)void setUnaryEnergy(const c_MatrixXf &unary)void setUnaryEnergy(const c_MatrixXf &L, const c_MatrixXf &feature)^
------------------------------------------------------------pydensecrf/densecrf.pxd:57:55: 'c_MatrixXf' is not a type identifierError compiling Cython file:
------------------------------------------------------------
...void setUnaryEnergy(UnaryEnergy *unary)void setUnaryEnergy(const c_MatrixXf &unary)void setUnaryEnergy(const c_MatrixXf &L, const c_MatrixXf &feature)# Inference methods.c_MatrixXf inference(int n_iterations)^
------------------------------------------------------------pydensecrf/densecrf.pxd:60:8: 'c_MatrixXf' is not a type identifierError compiling Cython file:
------------------------------------------------------------
...c_MatrixXf inference(int n_iterations)# TODO: Not enabled because it would require wrapping VectorXs (note the `s`)#c_VectorXs map(int n_iterations)# Step-by-step inference methods.c_MatrixXf startInference() const^
------------------------------------------------------------pydensecrf/densecrf.pxd:65:8: 'c_MatrixXf' is not a type identifierError compiling Cython file:
------------------------------------------------------------
...# TODO: Not enabled because it would require wrapping VectorXs (note the `s`)#c_VectorXs map(int n_iterations)# Step-by-step inference methods.c_MatrixXf startInference() constvoid stepInference(c_MatrixXf &Q, c_MatrixXf &tmp1, c_MatrixXf &tmp2) const^
------------------------------------------------------------pydensecrf/densecrf.pxd:66:27: 'c_MatrixXf' is not a type identifierError compiling Cython file:
------------------------------------------------------------
...# TODO: Not enabled because it would require wrapping VectorXs (note the `s`)#c_VectorXs map(int n_iterations)# Step-by-step inference methods.c_MatrixXf startInference() constvoid stepInference(c_MatrixXf &Q, c_MatrixXf &tmp1, c_MatrixXf &tmp2) const^
------------------------------------------------------------pydensecrf/densecrf.pxd:66:42: 'c_MatrixXf' is not a type identifierError compiling Cython file:
------------------------------------------------------------
...# TODO: Not enabled because it would require wrapping VectorXs (note the `s`)#c_VectorXs map(int n_iterations)# Step-by-step inference methods.c_MatrixXf startInference() constvoid stepInference(c_MatrixXf &Q, c_MatrixXf &tmp1, c_MatrixXf &tmp2) const^
------------------------------------------------------------pydensecrf/densecrf.pxd:66:60: 'c_MatrixXf' is not a type identifierError compiling Cython file:
------------------------------------------------------------
...# Step-by-step inference methods.c_MatrixXf startInference() constvoid stepInference(c_MatrixXf &Q, c_MatrixXf &tmp1, c_MatrixXf &tmp2) const#double gradient( int n_iterations, const ObjectiveFunction & objective, c_VectorXf * unary_grad, c_VectorXf * lbl_cmp_grad, c_VectorXf * kernel_grad=NULL ) const;double klDivergence(const c_MatrixXf &Q) const^
------------------------------------------------------------pydensecrf/densecrf.pxd:69:34: 'c_MatrixXf' is not a type identifierError compiling Cython file:
------------------------------------------------------------
...return eigen.MatrixXf().wrap(self._this.inference(niter))def startInference(self):return eigen.MatrixXf().wrap(self._this.startInference()), eigen.MatrixXf(), eigen.MatrixXf()def stepInference(self, MatrixXf Q, MatrixXf tmp1, MatrixXf tmp2):^
------------------------------------------------------------pydensecrf/densecrf.pyx:85:28: 'MatrixXf' is not a type identifierError compiling Cython file:
------------------------------------------------------------
...return eigen.MatrixXf().wrap(self._this.inference(niter))def startInference(self):return eigen.MatrixXf().wrap(self._this.startInference()), eigen.MatrixXf(), eigen.MatrixXf()def stepInference(self, MatrixXf Q, MatrixXf tmp1, MatrixXf tmp2):^
------------------------------------------------------------pydensecrf/densecrf.pyx:85:40: 'MatrixXf' is not a type identifierError compiling Cython file:
------------------------------------------------------------
...return eigen.MatrixXf().wrap(self._this.inference(niter))def startInference(self):return eigen.MatrixXf().wrap(self._this.startInference()), eigen.MatrixXf(), eigen.MatrixXf()def stepInference(self, MatrixXf Q, MatrixXf tmp1, MatrixXf tmp2):^
------------------------------------------------------------pydensecrf/densecrf.pyx:85:55: 'MatrixXf' is not a type identifierError compiling Cython file:
------------------------------------------------------------
...return eigen.MatrixXf().wrap(self._this.startInference()), eigen.MatrixXf(), eigen.MatrixXf()def stepInference(self, MatrixXf Q, MatrixXf tmp1, MatrixXf tmp2):self._this.stepInference(Q.m, tmp1.m, tmp2.m)def klDivergence(self, MatrixXf Q):^
------------------------------------------------------------pydensecrf/densecrf.pyx:88:27: 'MatrixXf' is not a type identifierError compiling Cython file:
------------------------------------------------------------
...def addPairwiseEnergy(self, float[:,::1] features not None, compat, KernelType kernel=DIAG_KERNEL, NormalizationType normalization=NORMALIZE_SYMMETRIC):self._this.addPairwiseEnergy(eigen.c_matrixXf(features), _labelcomp(compat), kernel, normalization)def setUnary(self, Unary u):self._this.setUnaryEnergy(u.move())^
------------------------------------------------------------pydensecrf/densecrf.pyx:71:33: ambiguous overloaded method
Traceback (most recent call last):File "setup.py", line 16, in <module>ext_modules=cythonize(['pydensecrf/eigen.pyx', 'pydensecrf/densecrf.pyx']),File "/home/stu/anaconda3/envs/rpc/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonizecythonize_one(*args)File "/home/stu/anaconda3/envs/rpc/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_oneraise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: pydensecrf/densecrf.pyx
(rpc) stu@amax:~/segment/dss_crf$
解决方法:
(1)尝试从该目录中删除__init__.py
。由于某些原因,它在尝试编译时混淆了cython。
(2)考虑使用pyximport扩展名: import pyximport; pyximport.install()
,然后import your_module
(好像是一个normal.py),如果您只想从普通python文件导入.pyx文件。
注意:在第一种情况下,__init__.py
不必删除。
相关文章:
Cython编译文件出错
报错信息: (rpc) stuamax:~/segment/dss_crf$ python setup.py install Compiling pydensecrf/eigen.pyx because it changed. Compiling pydensecrf/densecrf.pyx because it changed. [1/2] Cythonizing pydensecrf/densecrf.pyx /home/stu/anaconda3/envs/rpc/l…...

WPF 用户控件依赖注入赋值
前言 我一直想组件化得去开发WPF,因为我觉得将复杂问题简单化是最好的 如何组件化开发 主窗口引用 <Window x:Class"WpfApp1.MainWindow"xmlns"http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x"http://schemas.…...

leetcode-48.旋转图像
1. 题目 leetcode题目链接 给定一个 n n 的二维矩阵 matrix 表示一个图像。请你将图像顺时针旋转 90 度。 你必须在 原地 旋转图像,这意味着你需要直接修改输入的二维矩阵。请不要 使用另一个矩阵来旋转图像。 2. 编程 矩阵转置: 遍历矩阵&#x…...

antd的RangePicker设置默认值,默认近七天(andt+react)
import moment from "moment";state {initData:[moment().startOf(day).subtract(6, d), moment().endOf(day)], }<FormItem label"产生时间" {...tailItemLayout}>{getFieldDecorator("produceTime", {initialValue: initData})(<Ran…...

大数据可视化模块竞赛Vue项目文件结构与注意事项
1.vue项目src目录下只有两个文件夹与两个js文件,如图所示: 2.asseets目录存放包或其他外部资料 注意 :echarts采用的是引用外部文件导入 let echarts = require(@/assets/echarts.min.js) 3.components目录存放绘制页面的vue文件(我这里示例创建了一个newPage.vue)…...

户外运动盛行,运动品牌如何利用软文推广脱颖而出?
全民健康意识的提升和城市居民对亲近自然的渴望带来户外运动的盛行,这也使运动品牌的市场保持强劲发展势头,那么在激烈的市场竞争中,运动品牌应该如何脱颖而出呢?下面就让媒介盒子告诉你! 一、 分享户外运动干货 用户…...

2024年孝感市建筑类中级职称申报资料私企VS国企
2024年孝感市建筑类中级职称申报资料私企VS国企 民营企业中级职称申报跟事业单位或者是国企申报中级职称流程不一样么?实际上流程基本都是相同的,就是提交纸质版资料有点不一样。 孝感市建筑类中级职称申报基本流程 1.参加建筑类中级职称水平能力测试。 …...

OpenResty安装
OpenResty 是一个基于 Nginx 的 Web 平台,它将 Nginx 和 Lua 脚本语言结合起来,提供了更强大的 Web 应用开发和部署能力。OpenResty 仓库是 OpenResty 项目的官方仓库,包含了 OpenResty 的源代码、文档、示例等资源。 OpenResty 仓库地址是&…...

通过stream对list集合中对象的多个字段进行去重
记录下通过stream流对list集合中对象的多个字段进行去重! 举个栗子,对象book,我们要通过姓名和价格这两个字段的值进行去重,该这么做呢? distinct()返回由该流的不同元素组成的流。distinct&am…...

招投标系统软件源码,招投标全流程在线化管理
功能描述 1、门户管理:所有用户可在门户页面查看所有的公告信息及相关的通知信息。主要板块包含:招标公告、非招标公告、系统通知、政策法规。 2、立项管理:企业用户可对需要采购的项目进行立项申请,并提交审批,查看所…...
css设置文本溢出隐藏...
在CSS中,文本溢出可以使用text-overflow属性来处理,下面分别介绍单行文本溢出和多行文本溢出的处理方法1: 单行文本溢出。需要使用text-overflow: ellipsis;来显示省略号。需要注意的是,为了兼容部分浏览器,还需要设置…...

【小尘送书-第八期】《小团队管理:如何轻松带出1+1>2的团队》
大家好,我是小尘,欢迎你的关注!大家可以一起交流学习!欢迎大家在CSDN后台私信我!一起讨论学习,讨论如何找到满意的工作! 👨💻博主主页:小尘要自信 …...

【网络协议】聊聊ifconfig
我们知道在linux是ifconfig查看ip地址,但是ip addr也可以查看 IP 地址是一个网卡在网络世界的通讯地址,相当于我们现实世界的门牌号码。 从IP地址的划分来看,C类地址只可以容纳254个,而B类6W多,那么又没有一种折中的…...

python项目之AI动物识别工具的设计与实现(django)
项目介绍: 💕💕作者:落落 💕💕个人简介:混迹java圈十余年,擅长Java、小程序、Python等。 💕💕各类成品java毕设 。javaweb,ssm,spring…...

全流量安全分析发现内部系统外联异常
内部系统外连监控的重要性在于保护企业的信息安全和预防数据泄露,以下是几个重要的理由: 1、检测异常活动:通过监控内部系统的外连连接,可以及时发现是否有未经授权或异常的链接尝试。这可能表示存在恶意软件、黑客攻击或内部员工…...

Edge---微软浏览器-兼容性问题-解决办法(详细)
图片现象: 快捷键:winR (进入管理员命令窗口) 输入:regedit (进入注册表编辑器) 点击文件夹:HKEY_LOCAL_MACHINE 找到这个路径的文件项:HKEY_LOCAL_MACHINE\SOFTWARE…...

for循环遍历的`form表单组件`rules规则校验失效问题——下拉框选择之后还是报红---亲测有效
问题: 大概的效果就是这种, for循环选择之后还是还是报红 看文章之前 : 先检查 model rules pops 有没有判定好 解决: 参考了他的 for循环遍历的form表单组件rules规则校验失效问题——输入内容后依然提示必填,亲测有效——基础积累_a-form-model的validat…...

【Python数据分析工具】
文章目录 概要整体架构流程技术名词解释 概要 数据分析是一种通过收集、处理、分析和解释大量数据,以发现有价值信息、洞察趋势、制定决策并解决问题的过程。在现代科技和互联网的推动下,数据分析变得日益重要。它不仅仅是对数字和图表的简单解释&#…...

Python数据挖掘入门进阶与实用案例:自动售货机销售数据分析与应用
文章目录 写在前面01 案例背景02 分析目标03 分析过程04 数据预处理1. 清洗数据2.属性选择3.属性规约 05 销售数据可视化分析1.销售额和自动售货机数量的关系2.订单数量和自动售货机数量的关系3.畅销和滞销商品4.自动售货机的销售情况5.订单支付方式占比6.各消费时段的订单用户…...

2.3_9吸烟者问题
...

SpringBoot-17-MyBatis动态SQL标签之常用标签
文章目录 1 代码1.1 实体User.java1.2 接口UserMapper.java1.3 映射UserMapper.xml1.3.1 标签if1.3.2 标签if和where1.3.3 标签choose和when和otherwise1.4 UserController.java2 常用动态SQL标签2.1 标签set2.1.1 UserMapper.java2.1.2 UserMapper.xml2.1.3 UserController.ja…...
基于算法竞赛的c++编程(28)结构体的进阶应用
结构体的嵌套与复杂数据组织 在C中,结构体可以嵌套使用,形成更复杂的数据结构。例如,可以通过嵌套结构体描述多层级数据关系: struct Address {string city;string street;int zipCode; };struct Employee {string name;int id;…...

LBE-LEX系列工业语音播放器|预警播报器|喇叭蜂鸣器的上位机配置操作说明
LBE-LEX系列工业语音播放器|预警播报器|喇叭蜂鸣器专为工业环境精心打造,完美适配AGV和无人叉车。同时,集成以太网与语音合成技术,为各类高级系统(如MES、调度系统、库位管理、立库等)提供高效便捷的语音交互体验。 L…...

Qt/C++开发监控GB28181系统/取流协议/同时支持udp/tcp被动/tcp主动
一、前言说明 在2011版本的gb28181协议中,拉取视频流只要求udp方式,从2016开始要求新增支持tcp被动和tcp主动两种方式,udp理论上会丢包的,所以实际使用过程可能会出现画面花屏的情况,而tcp肯定不丢包,起码…...

8k长序列建模,蛋白质语言模型Prot42仅利用目标蛋白序列即可生成高亲和力结合剂
蛋白质结合剂(如抗体、抑制肽)在疾病诊断、成像分析及靶向药物递送等关键场景中发挥着不可替代的作用。传统上,高特异性蛋白质结合剂的开发高度依赖噬菌体展示、定向进化等实验技术,但这类方法普遍面临资源消耗巨大、研发周期冗长…...

Docker 运行 Kafka 带 SASL 认证教程
Docker 运行 Kafka 带 SASL 认证教程 Docker 运行 Kafka 带 SASL 认证教程一、说明二、环境准备三、编写 Docker Compose 和 jaas文件docker-compose.yml代码说明:server_jaas.conf 四、启动服务五、验证服务六、连接kafka服务七、总结 Docker 运行 Kafka 带 SASL 认…...

定时器任务——若依源码分析
分析util包下面的工具类schedule utils: ScheduleUtils 是若依中用于与 Quartz 框架交互的工具类,封装了定时任务的 创建、更新、暂停、删除等核心逻辑。 createScheduleJob createScheduleJob 用于将任务注册到 Quartz,先构建任务的 JobD…...
测试markdown--肇兴
day1: 1、去程:7:04 --11:32高铁 高铁右转上售票大厅2楼,穿过候车厅下一楼,上大巴车 ¥10/人 **2、到达:**12点多到达寨子,买门票,美团/抖音:¥78人 3、中饭&a…...
深入理解Optional:处理空指针异常
1. 使用Optional处理可能为空的集合 在Java开发中,集合判空是一个常见但容易出错的场景。传统方式虽然可行,但存在一些潜在问题: // 传统判空方式 if (!CollectionUtils.isEmpty(userInfoList)) {for (UserInfo userInfo : userInfoList) {…...

【LeetCode】算法详解#6 ---除自身以外数组的乘积
1.题目介绍 给定一个整数数组 nums,返回 数组 answer ,其中 answer[i] 等于 nums 中除 nums[i] 之外其余各元素的乘积 。 题目数据 保证 数组 nums之中任意元素的全部前缀元素和后缀的乘积都在 32 位 整数范围内。 请 不要使用除法,且在 O…...