草庐IT

python - Grumpy 生成的 helloworld.go 的二进制文件没有生成

我编写了一个HelloWorld.py并使用grumpy将HelloWorld.py编译为Go源代码。但是在运行gobuild之后,没有生成二进制文件,gobuild命令成功执行,没有任何错误,但是在文件夹中没有找到二进制文件。这是HelloWorld.py中的代码:defhello():print("hello,world")这是在hello.go中生成的代码:package__main__importπg"grumpy/build/src/grumpy"varCode*πg.Codefuncinit(){Code=πg.NewCode("","hello.py",nil,0,fun

python - 在 Grumpy 中安装一个 python 包

我使用的是Fedora25并通过以下方式安装了Grumpy:gitclonehttps://github.com/google/grumpy.gitcdgrumpymakeexportGOPATH=$PWD/buildexportPYTHONPATH=$PWD/build/lib/python2.7/site-packages还能够毫无问题地从一个简单的python文件创建Go二进制文件:$tools/grumpchello.py>hello.go$gobuild-ohellohello.go$./hellohello,world但是我对如何安装python包一无所知!简单的pipin