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

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

        · 

猜你喜欢

转载自blog.csdn.net/matt45m/article/details/131633681
今日推荐