bug描述 Describe the Bug
新建了一个虚拟环境,安装命令是
python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu120/
然后import paddle 报错如下
>>> import paddle
Error: Can not import paddle core while this file exists: /home/minyingqian/anaconda3/envs/paddle/lib/python3.10/site-packages/paddle/base/libpaddle.so
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/minyingqian/anaconda3/envs/paddle/lib/python3.10/site-packages/paddle/__init__.py", line 33, in <module>
from .base import core # noqa: F401
File "/home/minyingqian/anaconda3/envs/paddle/lib/python3.10/site-packages/paddle/base/__init__.py", line 38, in <module>
from . import ( # noqa: F401
File "/home/minyingqian/anaconda3/envs/paddle/lib/python3.10/site-packages/paddle/base/backward.py", line 25, in <module>
from . import core, framework, log_helper, unique_name
File "/home/minyingqian/anaconda3/envs/paddle/lib/python3.10/site-packages/paddle/base/core.py", line 384, in <module>
raise e
File "/home/minyingqian/anaconda3/envs/paddle/lib/python3.10/site-packages/paddle/base/core.py", line 267, in <module>
from . import libpaddle
ImportError: libcudnn.so.8: cannot open shared object file: No such file or directory
其他补充信息 Additional Supplementary Information
No response
5条答案
按热度按时间f0ofjuux1#
更新
我在这个虚拟环境里装了cudnn和cudatoolkit,目前版本是
和
现在import paddle会报错:
biswetbf2#
@EliverQ ,报错信息很明确,
version GLIBCXX_3.4.30 not found
,你需要更新下你的gcc版本zz2j4svz3#
@EliverQ ,报错信息很明确,
version GLIBCXX_3.4.30 not found
,你需要更新下你的gcc版本已解决,谢谢!但我想问一下按照上述命令安装
为什么不会把cudnn和cudatookit一起装上嘞?之所以使用这个是因为 #64856 里提到要用这个才能多卡
fafcakar4#
@EliverQ ,cudnn和cudatoolkit应该是需要用户自己安装的,建议你使用官方的docker镜像(镜像内已包含各种cuda依赖)
qzwqbdag5#
我也出现了同样错误提示。在.py中import paddle就没问题,在jupyter notebook中import paddle就报错,怀疑是cuda版本的问题。先占个位,再试一下,后续反馈。