当前位置:网站首页>Pytorch has been installed in anaconda, and pycharm normally runs code, but vs code displays no module named 'torch‘
Pytorch has been installed in anaconda, and pycharm normally runs code, but vs code displays no module named 'torch‘
2022-07-05 07:12:00 【Weft collar network】
First, describe the problem in the previous figure
Environment variables checked , No problem , Installed
open vscode file -- Preferences -- Set up Search for setting.json
After the open , Comment or delete this line of code
"python.pythonPath":"D:\\ProgramData\\Anaconda3\\envs\\torch\\python.exe"
Then add “code-runner.executorMap” The following code will come out automatically
"code-runner.executorMap": {
"javascript": "node",
"java": "cd $dir && javac $fileName && java $fileNameWithoutExt",
"c": "cd $dir && gcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"cpp": "cd $dir && g++ $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"objective-c": "cd $dir && gcc -framework Cocoa $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"php": "php",
"python": "python -u",
"perl": "perl",
"perl6": "perl6",
"ruby": "ruby",
"go": "go run",
"lua": "lua",
"groovy": "groovy",
"powershell": "powershell -ExecutionPolicy ByPass -File",
"bat": "cmd /c",
"shellscript": "bash",
"fsharp": "fsi",
"csharp": "scriptcs",
"vbscript": "cscript //Nologo",
"typescript": "ts-node",
"coffeescript": "coffee",
"scala": "scala",
"swift": "swift",
"julia": "julia",
"crystal": "crystal",
"ocaml": "ocaml",
"r": "Rscript",
"applescript": "osascript",
"clojure": "lein exec",
"haxe": "haxe --cwd $dirWithoutTrailingSlash --run $fileNameWithoutExt",
"rust": "cd $dir && rustc $fileName && $dir$fileNameWithoutExt",
"racket": "racket",
"scheme": "csi -script",
"ahk": "autohotkey",
"autoit": "autoit3",
"dart": "dart",
"pascal": "cd $dir && fpc $fileName && $dir$fileNameWithoutExt",
"d": "cd $dir && dmd $fileName && $dir$fileNameWithoutExt",
"haskell": "runhaskell",
"nim": "nim compile --verbosity:0 --hints:off --run",
"lisp": "sbcl --script",
"kit": "kitc --run",
"v": "v run",
"sass": "sass --style expanded",
"scss": "scss --style expanded"
}
And then put the 8 Yes "python": "python -u" Change it to "python":"D:\\ProgramData\\Anaconda3\\envs\\torch\\python.exe"
"python":"D:\\ProgramData\\Anaconda3\\envs\\torch\\python.exe"
边栏推荐
- 全局变量和静态变量的初始化
- ROS2——Service服务(九)
- 【MySQL8.0不支持表名大写-对应方案】
- .net core踩坑实践
- Three body goal management notes
- ROS2——功能包(六)
- IPage can display data normally, but total is always equal to 0
- Mipi interface, DVP interface and CSI interface of camera
- SOC_SD_CMD_FSM
- The differences and connections among cookies, sessions, JWT, and tokens
猜你喜欢
Ethtool principle introduction and troubleshooting ideas for network card packet loss (with ethtool source code download)
Intelligent target detection 59 -- detailed explanation of pytoch focal loss and its implementation in yolov4
ROS2——配置开发环境(五)
[untitled]
SD_CMD_RECEIVE_SHIFT_REGISTER
inux摄像头(mipi接口)简要说明
[software testing] 04 -- software testing and software development
目标检测系列——Faster R-CNN原理详解
U-Boot初始化及工作流程分析
ROS2——初识ROS2(一)
随机推荐
【MySQL8.0不支持表名大写-对应方案】
你心目中的数据分析 Top 1 选 Pandas 还是选 SQL?
2022.06.27_ One question per day
Application of MATLAB in Linear Algebra (4): similar matrix and quadratic form
【软件测试】06 -- 软件测试的基本流程
一文揭开,测试外包公司的真实情况
Ros2 - function package (VI)
[software testing] 04 -- software testing and software development
PHY drive commissioning --- mdio/mdc interface Clause 22 and 45 (I)
[node] differences among NPM, yarn and pnpm
逻辑结构与物理结构
PowerManagerService(一)— 初始化
mingling
ROS2——topic话题(八)
Matlab在线性代数中的应用(四):相似矩阵及二次型
SD_CMD_RECEIVE_SHIFT_REGISTER
使用paping工具进行tcp端口连通性检测
1290_FreeRTOS中prvTaskIsTaskSuspended()接口实现分析
CGroup CPU group source code analysis
The problem of configuring opencv in qt5.13.2 is solved in detail