Code Monkey home page Code Monkey logo

Comments (8)

sbinet avatar sbinet commented on June 2, 2024

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 ?

from go-python.

benzsuankularb avatar benzsuankularb commented on June 2, 2024

Yes, c:\Python27

from go-python.

sbinet avatar sbinet commented on June 2, 2024

ok. could you give f1981c0 a spin?

from go-python.

benzsuankularb avatar benzsuankularb commented on June 2, 2024

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.

from go-python.

sbinet avatar sbinet commented on June 2, 2024

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

from go-python.

zhengchun avatar zhengchun commented on June 2, 2024

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?

from go-python.

yuxiaoba avatar yuxiaoba commented on June 2, 2024

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?

from go-python.

sbinet avatar sbinet commented on June 2, 2024

#78 should have addressed this.
feel free to reopen if that isn't the case.

from go-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.