Closed benzsuankularb closed 5 years ago
sorry, as you can see, go-python
hasn't been extensively used on Windows (TM).
I'll push shortly a cgoflags_posix.go
file for the non-windows platforms and a cgoflags_windows.go
one for Windows(TM).
Then, I could add the proper cgo
incantations for Windows(TM) in that file.
Do you know what is the canonical installation path of Python for that platform?
Is that c:\Python27
?
Yes, c:\Python27
ok. could you give f1981c0 a spin?
Thank you for very fast response, I've got this (in cygwin)
# github.com/sbinet/go-python
In file included from C:/Python27/include/Python.h:58:0,
from go-python.h:4,
from ..\github.com\sbinet\go-python\capi.go:3:
C:/Python27/include/pyport.h:886:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?). "
^
My python is 64-bits, Cygwin also 64-bits.
googling this error and after some random walk through the output, I've got this: http://stackoverflow.com/questions/29762560/cygwin-64-bit-cant-install-pillow-via-pip
could you make sure you have the correct cygwin version (32/64) and installed the correct Python2.7 version (32/64) ?
-s
I have same issue in windows:
{user}\AppData\Local\Temp\go-build142102602\github.com\sbinet\go-python\_obj\exceptions.cgo2.o: In function `_cgo_75d15165160c_Cfunc_PySignal_SetWakeupFd':
..\../cgo-gcc-prolog:493: undefined reference to `PySignal_SetWakeupFd'
{user}\AppData\Local\Temp\go-build142102602\github.com\sbinet\go-python\_obj\go-python.o: In function `_gopy_InitModule':
{GOPATH}/github.com/sbinet/go-python/go-python.c:147: undefined reference to `__imp_Py_InitModule4'
{user}\AppData\Local\Temp\go-build142102602\github.com\sbinet\go-python\_obj\go-python.o: In function `_gopy_InitModule3':
{GOPATH}/github.com/sbinet/go-python/go-python.c:152: undefined reference to `__imp_Py_InitModule4'
collect2.exe: error: ld returned 1 exit status
This is my config for cgoflags_windows.go
:
package python
// #cgo CFLAGS: -I{USER}/Anaconda2/include
// #cgo LDFLAGS: -L{USER}/Anaconda2/libs -lpython27
// #include "go-python.h"
import "C"
My environments:
Python 2.7.14 |Anaconda, Inc.| (default, Oct 15 2017, 03:34:40) [MSC v.1500 64 bit (AMD64)] on win32
@sbinet , any suggest?
I got this problem too,
In file included from C:/Python27/include/Python.h:61:0,
from ./go-python.h:4,
from C:\gopath\src\github.com\sbinet\go-python\capi.go:3:
C:/Python27/include/pyport.h:895:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
Have you solved it?
feel free to reopen if that isn't the case.
I
go get
in window. It's come up withThis not happen for me in OSX Now I cant even find
.pc
files in any directories. So I don't know what to add in PKG_CONFIG_PATHSorry for asking stupid question I'm pretty new in window, python, pkg-config