深度学习环境安装依赖时常见错误解决

1.pydantic

安装pydantic时报以下错误:

ImportError: cannot import name 'Annotated' from 'pydantic.typing' (C:\Users\duole\anaconda3\envs\vrh\lib\site-packages\pydantic\typing.py)

这个是版本错误,删除装好的版本,重新指定版本安装就可以了,解决方法:

复制代码
pip uninstall pydantic

pip install pydantic==1.10.8

2.zlibwapi

Could not locate zlibwapi.dll. Please make sure it is in your library path!

这是缺少dll的问题,打开下面网站,找到Zlib文件,下载Installation Guide - NVIDIA Docshttps://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#installdriver-windows

解压文件

lib文件放到C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\vxx.x\lib

dll文件放到C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\vxx.x\bin

xxx.x是cuda的版本。

3.Numpy

3.1 Numpy版本过高

AttributeError: module 'numpy' has no attribute 'complex'. np.complex was a deprecated alias for the builtin complex. To avoid this error in existing code, use complex by itself. Doing this will not modify any behavior and is safe. If you speci

这是numpy1.24以上的版本的问题,降到1.23就可以解决这个问题了。

复制代码
pip uninstall numpy
pip install numpy==1.23

3.1 Numpy版本过低

ImportError:Numba needs NumPy 1.22 or less

复制代码
pip uninstall numpy
pip install numpy

·

相关推荐
默_笙5 天前
🍙 给每个请求过安检:FastAPI 是怎么把校验写进类型注解的
python
小羊没烦恼!5 天前
初探性能优化——2个月到4小时的性能提升
java·开发语言·windows·算法·c#
LaughingZhu5 天前
Product Hunt 每日热榜 | 2026-09-19
人工智能·深度学习·神经网络·搜索引擎·百度
qq_426003965 天前
启动playwright录制codegen生成自动化测试脚本
python·自动化
虎头金猫5 天前
4K 视频总卡在公网带宽?用 N1 + OpenList 把网盘播放链路重新理顺
运维·服务器·网络·python·容器·beautifulsoup·pandas
长沙三为智能科技5 天前
家政小程序开发从0到上线:五阶段交付流程与验收清单
python
伞伞悦读5 天前
【第38期】Python 模块与包详解:import、from、模块搜索路径、包结构和 __init__
开发语言·python
猎头南楼5 天前
知识社区推荐系统实践:新用户冷启动与长短期兴趣建模的挑战 资深推荐算法工程师
人工智能·深度学习·算法·机器学习
只睡四小时5 天前
Canvas 弹道联机实战:700 行 + 固定时间步长
python·websocket·html5·游戏开发·canvas
高洁015 天前
未来三年,AI 落地的五个确定性判断一
人工智能·深度学习·机器学习·transformer·知识图谱