Skip to content

ctypes: ImportError: cannot import name '_non_existing_function' #6299

Description

@anki-code

Hello! I'm trying to run xonsh shell using rustpython on Mac but faced with error:

xonsh
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh  # https://rustup.rs/
# restart shell
cargo install --features=ssl --git https://github.com/RustPython/RustPython rustpython
$PATH.append(p'~/.cargo/bin')
#rustpython -m site  # to get locations
rustpython --install-pip
rustpython -m pip install xonsh

~/.local/bin/xonsh --no-rc --no-env
Traceback (most recent call last):
  File "/Users/pc/.local/bin/xonsh", line 3, in <module>
    from xonsh.main import main
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/xonsh/main.py", line 12, in <module>
    import xonsh.procs.pipelines as xpp
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/xonsh/procs/__init__.py", line 1, in <module>
    from xonsh.procs import proxies  # noqa
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/xonsh/procs/proxies.py", line 19, in <module>
    import xonsh.lib.lazyimps as xli
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/xonsh/lib/lazyimps.py", line 7, in <module>
    from xonsh.platform import ON_DARWIN, ON_WINDOWS
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/xonsh/platform.py", line 7, in <module>
    import ctypes  # noqa
  File "/Users/pc/.cargo/git/checkouts/rustpython-63090cdce5e18442/1e7a490/crates/pylib/Lib/ctypes/__init__.py", line 40, in <module>
    from _ctypes import _non_existing_function
ImportError: cannot import name '_non_existing_function'

Could you please help to resolve this?

For community

⬇️ Please click the 👍 reaction instead of leaving a +1 or 👍 comment

Activity

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