go-python icon indicating copy to clipboard operation
go-python copied to clipboard

go get report errors

Open ttzc opened this issue 5 years ago • 2 comments

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

ttzc avatar Feb 01 '20 09:02 ttzc

I got the same mistake。 I‘m build on windows 10.

E:\work\go\go-common-util>go get github.com/sbinet/go-python #github.com/sbinet/go-python In file included from ..\pkg\mod\github.com\sbinet\[email protected]\capi.go:3: ./go-python.h:4:10: fatal error: Python.h: No such file or directory #include "Python.h" ^~~~~~~~~~ compilation terminated.

huangll avatar Aug 09 '21 09:08 huangll

same

# github.com/sbinet/go-python
In file included from D:\GOPATH\pkg\mod\github.com\sbinet\[email protected]\capi.go:3:
./go-python.h:4:10: fatal error: Python.h: No such file or directory
    4 | #include "Python.h"
      |          ^~~~~~~~~~
compilation terminated.

EldersJavas avatar Jan 24 '22 05:01 EldersJavas

what can i do ?

EniMusguera avatar Sep 20 '22 01:09 EniMusguera

instructions for the compilation failures are noted on the README:

  • https://github.com/sbinet/go-python#install

these compilation failures usually boil down to cgo not being able to locate the CPython development headers. one needs to:

  • make sure these development headers are properly installed e.g.: apt install python2-dev on a Debian-like distribution
  • make sure these development headers can be found by cgo (either by installing pkgconfig support files for CPython2, or by editing cgoflags.go in go-python)

sbinet avatar Sep 22 '22 07:09 sbinet