如何优雅地解决SciPy和NumPy版本冲突?

部署运行你感兴趣的模型镜像

在Python编程中,SciPy和NumPy库经常用于科学计算和数据分析。然而,有时由于不同版本的兼容性问题,可能会遇到版本冲突的情况。本文将介绍几种方法来解决这一问题,避免不必要的麻烦并确保项目顺利运行。

如何优雅地解决SciPy和NumPy版本冲突? - 集智数据集

您可能感兴趣的与本文相关的镜像

Python3.9

Python3.9

Conda
Python

Python 是一种高级、解释型、通用的编程语言,以其简洁易读的语法而闻名,适用于广泛的应用,包括Web开发、数据分析、人工智能和自动化脚本

C:\Users\14432\anaconda3\lib\site-packages\scipy\__init__.py:146: UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.26.4 warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}" Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\14432\anaconda3\lib\tkinter\__init__.py", line 1892, in __call__ return self.func(*args) File "C:\Users\14432\anaconda3\lib\tkinter\__init__.py", line 814, in callit func(*args) File "C:\Users\14432\AppData\Local\Temp\ipykernel_10632\1170608080.py", line 486, in <lambda> self.after(0, lambda: self.status_var.set(f"历史数据加载完成: {len(self.comparator.history_df)}条记录")) TypeError: object of type 'NoneType' has no len() Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\14432\anaconda3\lib\tkinter\__init__.py", line 1892, in __call__ return self.func(*args) File "C:\Users\14432\anaconda3\lib\tkinter\__init__.py", line 814, in callit func(*args) File "C:\Users\14432\AppData\Local\Temp\ipykernel_10632\1170608080.py", line 487, in <lambda> self.after(0, lambda: self.log_message(f"历史数据加载完成,共{len(self.comparator.history_df)}条记录")) TypeError: object of type 'NoneType' has no len() 2025-09-14 23:32:57,539 - WARNING - Cannot set gray non-stroke color because /'P1' is an invalid float value 2025-09-14 23:32:57,539 - WARNING - Cannot set gray non-stroke color because /'P2' is an invalid float value 2025-09-14 23:32:57,539 - WARNING - Cannot set gray non-stroke color because /'P1' is an invalid float value 2025-09-14 23:32:57,540 - WARNING - Cannot set gray non-stroke color because /'P2' is an invalid float value 2025-09-14 23:32:57,541 - WARNING - Cannot set gray non-stroke color because /'P3' is an invalid float value 2025-09-14 23:32:57,541 - WARNING - Cannot set gray non-stroke color because /'P4' is an invalid float value 2025-09-14 23:32:57,542 - WARNING - Cannot set gray non-stroke color because /'P1' is an invalid float value 2025-09-14 23:32:57,542 - WARNING - Cannot set gray non-stroke color because /'P2' is an invalid float value 2025-09-14 23:32:57,544 - WARNING - Cannot set gray non-stroke color because /'P3' is an invalid float value 2025-09-14 23:32:57,544 - WARNING - Cannot set gray non-stroke color because /'P4' is an invalid float value 2025-09-14 23:32:57,545 - WARNING - Cannot set gray non-stroke color because /'P1' is an invalid float value 2025-09-14 23:32:57,545 - WARNING - Cannot set gray non-stroke color because /'P2' is an invalid float value 2025-09-14 23:32:57,546 - WARNING - Cannot set gray non-stroke color because /'P3' is an invalid float value 2025-09-14 23:32:57,546 - WARNING - Cannot set gray non-stroke color because /'P4' is an invalid float value 2025-09-14 23:32:57,546 - WARNING - Cannot set gray non-stroke color because /'P3' is an invalid float value 2025-09-14 23:32:57,547 - WARNING - Cannot set gray non-stroke color because /'P4' is an invalid float value 2025-09-14 23:32:57,547 - WARNING - Cannot set gray non-stroke color because /'P3' is an invalid float value 2025-09-14 23:32:57,548 - WARNING - Cannot set gray non-stroke color because /'P4' is an invalid float value 2025-09-14 23:32:57,549 - WARNING - Cannot set gray non-stroke color because /'P1' is an invalid float value 2025-09-14 23:32:57,549 - WARNING - Cannot set gray non-stroke color because /'P2' is an invalid float value 2025-09-14 23:32:57,549 - WARNING - Cannot set gray non-stroke color because /'P1' is an invalid float value 2025-09-14 23:32:57,550 - WARNING - Cannot set gray non-stroke color because /'P2' is an invalid float value 2025-09-14 23:32:57,550 - WARNING - Cannot set gray non-stroke color because /'P1' is an invalid float value 2025-09-14 23:32:57,551 - WARNING - Cannot set gray non-stroke color because /'P2' is an invalid float value 开始解析PDF: C:/Users/14432/Desktop/自动比价系统/s26c-725082615560.pdf 开始解析PDF: C:/Users/14432/Desktop/自动比价系统/对照品询比价2025.08.21-2--广州佳途报价---TO华东医药-更新2.pdf 开始解析PDF: C:/Users/14432/Desktop/自动比价系统/广州隽沐报价单20250826-中美华东(3).pdf 开始解析PDF: C:/Users/14432/Desktop/自动比价系统/翔龙报价单-华东-20250825.pdf 检测为扫描版PDF,使用OCR解析 开始处理扫描版PDF: C:/Users/14432/Desktop/自动比价系统/翔龙报价单-华东-20250825.pdf 检测为扫描版PDF,使用OCR解析 开始处理扫描版PDF: C:/Users/14432/Desktop/自动比价系统/s26c-725082615560.pdf 检测为扫描版PDF,使用OCR解析 开始处理扫描版PDF: C:/Users/14432/Desktop/自动比价系统/广州隽沐报价单20250826-中美华东(3).pdf 检测为文本型PDF,使用pdfplumber解析=== 依赖库版本检查 === Python版本: 3.9.12 NumPy版本: 1.26.4 pandas版本: 2.3.2 pdfplumber版本: 0.11.7 paddleocr版本: 3.2.0 警告: cnocr未安装 pdf2image版本: 未知版本 警告: PyMuPDF未安装 警告: opencv-python未安装 openpyxl版本: 3.1.5 psutil版本: 5.8.0 === 依赖检查完成 === 开始加载历史数据: C:/Users/14432/Desktop/自动比价系统/近五年订单汇总.xlsx 开始解析4个PDF文件 错误: 解析 C:/Users/14432/Desktop/自动比价系统/翔龙报价单-华东-20250825.pdf 失败 - name 'fitz' is not defined 错误: 解析 C:/Users/14432/Desktop/自动比价系统/s26c-725082615560.pdf 失败 - name 'fitz' is not defined 错误: 解析 C:/Users/14432/Desktop/自动比价系统/广州隽沐报价单20250826-中美华东(3).pdf 失败 - name 'fitz' is not defined 成功解析: C:/Users/14432/Desktop/自动比价系统/对照品询比价2025.08.21-2--广州佳途报价---TO华东医药-更新2.pdf 所有PDF文件解析完成
09-15
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值