Closed ttzc closed 1 year ago
I got the same mistake。 I‘m build on windows 10.
E:\work\go\go-common-util>go get github.com/sbinet/go-python
In file included from ..\pkg\mod\github.com\sbinet\go-python@v0.1.0\capi.go:3: ./go-python.h:4:10: fatal error: Python.h: No such file or directory
^~~~~~~~~~
compilation terminated.
same
# github.com/sbinet/go-python
In file included from D:\GOPATH\pkg\mod\github.com\sbinet\go-python@v0.1.0\capi.go:3:
./go-python.h:4:10: fatal error: Python.h: No such file or directory
4 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
what can i do ?
instructions for the compilation failures are noted on the README
:
these compilation failures usually boil down to cgo
not being able to locate the CPython development headers.
one needs to:
apt install python2-dev
on a Debian-like distributioncgo
(either by installing pkgconfig
support files for CPython2, or by editing cgoflags.go
in go-python
)
Wrong information:
go-python
In file included from .\capi.go:3:0: ./go-python.h:4:20: fatal error: Python.h: No such file or directory
include "Python.h"
compilation terminated