visual-studio-code - 在VSCode中直接执行Python代码的问题
PHPz
PHPz 2017-04-17 17:16:48
0
2
336

http://stackoverflow.com/q/29987840/5295549
我参照stackoverflow上的一个answer那么做了,可是出现以下错误:

Failed to launch external program C:\Python35 
app.py. 
spawn C:\Python35 ENOENT 

请问是什么问题呢?

这是我的配置【只修改了下command路径】

{
    "version": "0.1.0",
    "command": "C:\\Python35",
    "args": ["app.py"],
    "problemMatcher": {
        "fileLocation": ["relative", "${workspaceRoot}"],
        "pattern": {
            "regexp": "^(.*)+s$",
            "message": 1
        }
    }
}
PHPz
PHPz

学习是最好的投资!

全部回覆(2)
小葫芦

就在這個SO下面有另一個回答,前段時間剛好簡單翻譯了下。
看這裡

洪涛
{
    "version": "0.1.0",

    // The command is tsc. Assumes that tsc has been installed using npm install -g typescript
    "command": "C:\Python35\python",

    // The command is a shell script
    "isShellCommand": true,

    // Show the output window only if unrecognized errors occur.
    "showOutput": "always",

    // args is the HelloWorld program to compile.
    "args": ["${file}"],

    // use the standard tsc problem matcher to find compile problems
    // in the output.
    //"problemMatcher": "$tsc"
}

將配置做以上修改即可。

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!