当前位置:网站首页>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——功能包(六)
- ROS2——配置开发环境(五)
- PostMessage communication
- About vscode, "code unreachable" will be displayed when calling sendline series functions with pwntools“
- Energy conservation and creating energy gap
- [solved] there is something wrong with the image
- Brief description of inux camera (Mipi interface)
- 能量守恒和打造能量缺口
- [node] NVM version management tool
- [node] differences among NPM, yarn and pnpm
猜你喜欢
Ethtool principle introduction and troubleshooting ideas for network card packet loss (with ethtool source code download)
U-Boot初始化及工作流程分析
ethtool 原理介绍和解决网卡丢包排查思路(附ethtool源码下载)
Qt项目中的日志库log4qt使用
ROS2——Service服务(九)
Ros2 - function package (VI)
Docker installs MySQL and uses Navicat to connect
docker安装mysql并使用navicat连接
【软件测试】04 -- 软件测试与软件开发
Concurrent programming - deadlock troubleshooting and handling
随机推荐
逻辑结构与物理结构
U-Boot初始化及工作流程分析
ROS2——配置开发环境(五)
基于Cortex-M3、M4的GPIO口位带操作宏定义(可总线输入输出,可用于STM32、ADuCM4050等)
SOC_ SD_ DATA_ FSM
Energy conservation and creating energy gap
能量守恒和打造能量缺口
Negative number storage and type conversion in programs
【软件测试】04 -- 软件测试与软件开发
并发编程 — 死锁排查及处理
Skywalking all
The problem of configuring opencv in qt5.13.2 is solved in detail
Spinningup drawing curve
[software testing] 05 -- principles of software testing
【软件测试】02 -- 软件缺陷管理
SD_CMD_SEND_SHIFT_REGISTER
【Node】nvm 版本管理工具
Special training of C language array
Marvell 88E1515 PHY loopback模式测试
Interpretation of the earliest sketches - image translation work sketchygan