Skip to content

Issues Importing pystk in PySuperTuxKart on Apple M2 Chip with macOS #39

@victoriaagc

Description

@victoriaagc

Describe the bug
I am unable to import the pystk module after installing PySuperTuxKart on my MacBook Pro with an Apple M2 chip. The installation of PySuperTuxKart reports success, but attempting to import pystk in Python results in an ImportError related to missing symbols in the libpng library.

To Reproduce

pip install -U PySuperTuxKart
python -c "import pystk"

Expected behavior
I expected the pystk module to be imported without errors, allowing me to run the controller.py script for my SuperTuxKart game project as part of my coursework.

Screenshots
image

System information:

  • OS: macOS 14.1.1
  • CPU: Apple M2
  • GPU: (integrated Apple GPU as part of the M2 chip)
  • Python Version: 3.9.18 (also tried with 3.8.18)

Additional context

  • The ImportError I encounter is: symbol not found in flat namespace '_png_init_filter_functions_neon'.
  • I have attempted to reinstall PySuperTuxKart using --no-cache-dir and --force-reinstall options.
  • I have tried running Python under Rosetta 2 but received a "Bad CPU type in executable" error.
  • Google Colab does not support the GUI elements required by PySuperTuxKart, so it's not a viable workaround.
  • This is a persistent issue that seems to involve a binary compatibility problem with the libpng library on the M2 architecture.
  • I am looking for any solutions or workarounds that could help me run PySuperTuxKart and import pystk successfully on my system for my coursework.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions