vsc 如何调试远程python代码

1、远程python环境准备

下载miniconda

  https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/

注意py版本,需要下载对应版本的conda,找到对应的版本后(这里选择py312),鼠标右键复制链接

  wget  相关链接

  bash  xxx.sh  

  按提示操作就行。最后一个提示可能是:是否进入bash之后自动进入相关的环境。

  至此conda 安装完毕。下一步准备python环境

  conda create -n  your_env_name  python=3.12     创建python环境

  conda activate your_env_name     激活使用python环境

在pip 安装包的过程中,可能会报:

  error: command 'gcc' failed: Permission denied

  自行安装gcc即可: https://wenku.csdn.net/answer/c9c0573a138732c45ec74623d78e69a2

在pip 安装包的过程中,可能会报:

  PermissionError: [Errno 13] Permission denied: 'pkg-config'

  自行安装pkg-confg即可:  sudo apt-get install pkg-config

在pip 安装包的过程中,可能会报:

  PermissionError: [Errno 13] Permission denied: 'c++'

  自行安装c++即可: sudo apt install build-essential

如果百度上搜不到报错原因,直接把出错的所有信息粘贴到chatglm.cn 上,问智谱清言。

2、把需要调试的代码准备到远程

3、后续见:https://3cst.cn/mobile/information/bCj5Jpxmagnw11ea8d6300163e0473d8

posted @ 2024-03-05 13:58  xunhanliu  阅读(19)  评论(0编辑  收藏  举报