cant build under python3.10,3.9,3.8,only works 3.11 currently · Issue #308 · go-python/gopy · GitHub
Skip to content

cant build under python3.10,3.9,3.8,only works 3.11 currently #308

Open

Description

@cwing2019

C:\Users\Administrator\gotest>gopy build -output=out -vm=python3 hi.go

--- Processing package: command-line-arguments ---
no LibDir -- copy from IncDir: C:/Python38/libs
no LibPy -- set to: python38
no LibDir -- copy from IncDir: C:/Python38/libs
no LibPy -- set to: python38

--- building package ---
gopy build -output=out -vm=python3 hi.go
goimports -w hi.go
cmd had error: exit status 2 output:
oerr: go resolves to executable in current directory (.\go.py): stderr:

2023/01/25 17:33:28 error dispatching command: exit status 2

Activity

  1. cwing2019 commented on Jan 25, 2023

    @cwing2019
    Author

    once uninstall py3.11,and reinstall py3.11,it also dont works.. dont know why. can't see anylogs

  2. rcoreilly commented on Jan 25, 2023

    @rcoreilly
    Member

    is it possibly not finding python3? can you verify it is found at commandline? and pybindgen is installed?

  3. cwing2019 commented on Jan 25, 2023

    @cwing2019
    Author

    yes,both python3 and pybindgen is ok.

    I try on a new fresh install windows10 and install python from python.org . and i am sure install pybindgen ok
    the same result..

  4. cwing2019 commented on Jan 25, 2023

    @cwing2019
    Author

    pygen version like this
    C:\Python311\Lib\site-packages\PyBindGen-0.22.1.dist-info
    C:\Python3.8\Lib\site-packages\PyBindGen-0.22.1.dist-info

  5. cwing2019 commented on Jan 25, 2023

    @cwing2019
    Author

    infact,the go,py file has been generate to out2 or out folder anyhow.
    C:\Users\Administrator\gotest\out2>goimports -w hi.go
    err: go resolves to executable in current directory (.\go.py): stderr:

    simply execute this also gets an error.

  6. cwing2019 commented on Jan 25, 2023

    @cwing2019
    Author

    is it possibly not finding python3? can you verify it is found at commandline? and pybindgen is installed?

    C:\Users\Administrator\gotest>goimports -w out4\simple.go //this echo nothing.
    C:\Users\Administrator\gotest>cd out4
    C:\Users\Administrator\gotest\out4>goimports -w simple.go //after cd an output folder,run goimports error. is it a runtime path problem?
    err: go resolves to executable in current directory (.\go.py): stderr:

  7. Half-Quarter commented on Feb 11, 2025

    @Half-Quarter

    I am experiencing the same problem as you, have you already acquired the solution?

  8. b-long commented on Apr 2, 2025

    @b-long
    Member

    I'd love to see if we could build a (github) reproducible build together to discuss this issue and solve it together.

    Something that may help, is a cookiecutter for gopy.
    I've created one (it isn't perfect, but it is essentially the same code that I'm using for two projects).

    Here's the cookiecutter I built:

    I'd love for you all to try my cookiecutter and push something to Github that we can all see.

    My two projects (published to pypi.org) based on this project structure are here:

    They are only pushing python 3.11 and 3.12 wheels, but it's a very small change to the Github Actions code to experiment. Feel free to open PRs or experiment with any of the above.

    As of today (April 2, 2025):

    "GitHub Actions usage is free for standard GitHub-hosted runners in public repositories" .

    We might as well use these resources and try to find/fix any bugs 🙂 🐛

    cc/ @cwing2019 @Half-Quarter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions