每日总结2023/4.3(conda下的paddle安装)

发布时间 2023-04-04 21:58:45作者: 橘子味芬达水

 

 

 

 上一步我们·已经成功安装了conda,首先我们创建一个虚拟环境

conda create -n paddle22 python=你的python版本

我这里命名为了paddle22

 

 安装完成后输入

conda.bat activite paddle22 

进入我们的虚拟环境,根据个人提示,我的版本无法使用conda activite paddle22直接进入需要加.bat

 

 这里可以查看自己安装了大概有什么

进入我们的虚拟环境后可以通过

where python   查看我们的python路径以及

python --version查看python版本

检测系统环境

python -c "import platform;print(platform.architecture()[0]);print(platform.machine())"

 

 

 

 

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/

conda config --set show_channel_urls yes

 

 cpu

conda install paddlepaddle==2.4.2 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/

gpu

conda install paddlepaddle-gpu==2.4.2 cudatoolkit=10.2 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/

我这里安装的gpu版本,根据个人需求安装即可

安装完成后进入cmd下 python

输入import paddle查看  安装情况

paddle.utils.run_check()

再输入 paddle.utils.run_check()

如果出现PaddlePaddle is installed successfully!,说明您已成功安装。

 

 题外话是推荐大家安装完conda更换为清华源,不然连接可能会很慢,然后如果在gpu安装报错后可以看看以下文章

(28条消息) Win10环境下paddlepaddle安装踩坑实录_飞桨为什么不支持cuda11.3_学渣戊的博客-CSDN博客

 

https://www.bilibili.com/video/BV1fF411j7Aa/?spm_id_from=333.1007.top_right_bar_window_history.content.click

百度飞桨学习视频