Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/silverlight/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Hyperledger fabric 如何在hyperledger结构中使用链码访问python文件?_Hyperledger Fabric_Hyperledger - Fatal编程技术网

Hyperledger fabric 如何在hyperledger结构中使用链码访问python文件?

Hyperledger fabric 如何在hyperledger结构中使用链码访问python文件?,hyperledger-fabric,hyperledger,Hyperledger Fabric,Hyperledger,我试图通过以下函数使用链码运行python脚本: cmd := exec.Command("python", "-c" ,"from land import *;print a.validate_proof(a.get_proof(1),'36e0fd847d927d68475f32a94efff30812ee3ce87c7752973f4dd7476aa2e97e','b8b1f39aa2e3fc2dde37f3df04e829f514fb98369b522bfb35c663befa8

我试图通过以下函数使用链码运行python脚本:

    cmd := exec.Command("python", "-c" ,"from land import *;print a.validate_proof(a.get_proof(1),'36e0fd847d927d68475f32a94efff30812ee3ce87c7752973f4dd7476aa2e97e','b8b1f39aa2e3fc2dde37f3df04e829f514fb98369b522bfb35c663befa896766')")
    output, err := cmd.CombinedOutput()
    if err != nil {
        l := fmt.Sprint(err) + ": " + string(output)
        return shim.Error(l)
    } else {
        return shim.Success([]byte(string(output)))
    }
但我在尝试调用通道上的链码时遇到以下错误:

chaincode error (status: 500, message: exec: "python": executable file not found in $PATH:

它看起来像是执行链码的节点,但却没有安装python。您到底为什么要这样做?但正如mgosk所指出的,python并没有安装在运行链码的映像中。