使用anaconda 安装paddle gpu环境

conda create -n paddlespeech python=3.7 cudnn=7.6.5.32 cudatoolkit=10.2.89 ffmpeg x264

pip install paddlepaddle-gpu -i https://mirror.baidu.com/pypi/simple

使用时的错误如下:

error: Can not import paddle core while this file exists: anaconda3/envs/paddlespeech_gpu/lib/python3.7/site-packages/paddle/fluid/libpaddle.so
Traceback (most recent call last):
File "paddle_speech_asr-gpu.py", line 11, in
import paddle
File "anaconda3/envs/paddlespeech_gpu/lib/python3.7/site-packages/paddle/__init__.py", line 25, in
from .framework import monkey_patch_variable
File "/home/anaconda3/envs/paddlespeech_gpu/lib/python3.7/site-packages/paddle/framework/__init__.py", line 17, in
from . import random # noqa: F401
File "/home/anaconda3/envs/paddlespeech_gpu/lib/python3.7/site-packages/paddle/framework/random.py", line 16, in
import paddle.fluid as fluid
File "/home/anaconda3/envs/paddlespeech_gpu/lib/python3.7/site-packages/paddle/fluid/__init__.py", line 36, in
from . import framework
File "/home/anaconda3/envs/paddlespeech_gpu/lib/python3.7/site-packages/paddle/fluid/framework.py", line 37, in
from . import core
File "/home/anaconda3/envs/paddlespeech_gpu/lib/python3.7/site-packages/paddle/fluid/core.py", line 338, in
raise e
File "/home/anaconda3/envs/paddlespeech_gpu/lib/python3.7/site-packages/paddle/fluid/core.py", line 274, in
from . import libpaddle
ImportError: libcudart.so.10.2: cannot open shared object file: No such file or directory

解决办法如下,参考export LD_LIBRARY_PATH=/home/anaconda3/pkgs/cudatoolkit-10.2.89-hfd86e86_1/lib:$LD_LIBRARY_PATH

你可能感兴趣的:(深度学习基础,paddle,python,开发语言)