Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to import CPPYY on PyPy on Windows #1

Open
Keithcat1 opened this issue Jul 24, 2021 · 1 comment
Open

Failed to import CPPYY on PyPy on Windows #1

Keithcat1 opened this issue Jul 24, 2021 · 1 comment

Comments

@Keithcat1
Copy link

I'm on windows 10 64-bit, using PyPy.
Python 3.7.10 (77787b8f4c49, May 15 2021, 11:51:36)
[PyPy 7.3.5 with MSC v.1927 64 bit (AMD64)]
I did a pip install cppyy just now wwhich worked, but actually importing cppyy caused an error:
C:\py>pypy3
Python 3.7.10 (77787b8f4c49, May 15 2021, 11:51:36)
[PyPy 7.3.5 with MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

import cppyy
Traceback (most recent call last):
File "", line 1, in
File "C:\pypy\site-packages\cppyy_init_.py", line 72, in
from ._pypy_cppyy import *
File "C:\pypy\site-packages\cppyy_pypy_cppyy.py", line 33, in
import _cppyy as _backend # built-in module
ModuleNotFoundError: No module named '_cppyy'

@wlav
Copy link
Owner

wlav commented Jul 25, 2021

If _cppyy isn't available, then it hasn't been enabled by upstream yet. Indeed, looking in the pypyoptions.py file, I see:

    # not ported yet
    if IS_64_BITS:
        for name in ["cpyext", "_cppyy", "micronumpy"]:
            if name in working_modules:
                working_modules.remove(name)

I do believe _cppyy itself is functional on Windows 64b, although I have no good way of testing it (I can only run Windows through VMWare on my Macbook, which isn't a realistic option to build pypy-c from source). But _cppyy depends on cpyext for some parts, which apparently in turn hasn't been ported yet either, so that's moot for now. (Upstream also has basically no Windows resources to speak of, so I don't know what the time scale for porting cpyext would be.)

(In principle, it should be possible to carve out and disable the part of _cppyy that depends on cpyext, as it's not a core feature. But then the same thing applies: no resources to test it on.)

I recommend to stay with the 32b version (esp. since w/o cpyext you won't be able to run any other extension modules either).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants