#31 环境安装有疑问

Open
created 1 year ago by xiaobaistudy · 2 comments
<!-- 需要按照模板,填写每一项内容,请勿改动 --> ### 问题所属任务编号(Task 01-05) Task 01 ### 运行环境(操作系统版本、Python 版本)/ 非程序问题 运行环境问题,我安装了anaconda,看视频看不懂。 ### 完整的报错信息(截图或复制均可)/ 问题详细描述 ### 描述你期望看到的结果 想知道安装了anaconda我还需要做哪些事情,才能做深度学习。
anine09 commented 1 year ago
Collaborator
hi @xiaobaistudy 你还需要运行以下命令:`pip install d2l torch`,复制粘贴到 Anaconda 中就可以开始深度学习啦😀
anine09 added the
Task 01
label 1 year ago
anine09 added this to the 助教解答过 milestone 1 year ago
anine09 added the
程序问题
label 1 year ago
JeffDing commented 1 year ago
### 更换conda源 ```bash vim ~/.condarc ``` 内容如下: ``` default_channels: - https://mirror.sjtu.edu.cn/anaconda/pkgs/r - https://mirror.sjtu.edu.cn/anaconda/pkgs/main custom_channels: conda-forge: https://mirror.sjtu.edu.cn/anaconda/cloud/ pytorch: https://mirror.sjtu.edu.cn/anaconda/cloud/ channels: - defaults ``` ### 创建学习环境 ```bash conda create -n d2l python=3.9 ``` ### 激活环境 ```bash conda activate d2l ``` ### 变更pip源头 ```bash pip config set global.index-url https://mirror.sjtu.edu.cn/pypi/web/simple ``` ### 安装必要的包 **安装torch** ```bash pip install torch==1.12.0 pip install torchvision==0.13.0 ``` **安装d2l包** ```bash pip install d2l ``` ### 下载代码仓 ```bash git clone https://openi.pcl.ac.cn/Datawhale/d2l ``` 注:如果没有git工具安装命令如下 ```bash (sudo) apt install git #ubuntu系统 (sudo) yum install git #centos系统 ``` ### 安装jupyter lab 个人比较喜欢使用juypter lab进行时间,如果喜欢使用notebook的话可以不执行这一步 **安装** ```bash pip install jupyterlab ``` **设置密码** ```bash jupyter lab passwd ``` ### 启动juypterlab ```bash jupyter lab --ip 0.0.0.0 --allow-root ``` 至此环境准备工作全部完成
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.