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

SPSS 29 Statistics cannot import module #1201

Closed
fadedhero opened this issue Feb 22, 2024 · 2 comments
Closed

SPSS 29 Statistics cannot import module #1201

fadedhero opened this issue Feb 22, 2024 · 2 comments
Assignees

Comments

@fadedhero
Copy link

Trying to import pydantic_core in SPSS29 gives me an error:

Traceback (most recent call last): 
  File "<string>", line 2, in <module> 
  File "C:\Users\[user]\AppData\Roaming\IBM\SPSS Statistics\one\Python310\Lib\site-packages\pydantic_core\__init__.py", line 6, in <module> 
    from ._pydantic_core import ( 
ModuleNotFoundError: No module named 'pydantic_core._pydantic_core'

My SPSS syntax:

BEGIN PROGRAM PYTHON3.
import pydantic_core
END PROGRAM.

SPSS29 is using Python 3.10.4

The module is getting installed via dependency from openai module.

any ideas?

@fadedhero fadedhero changed the title SPSS 29 Statistics SPSS 29 Statistics cannot import module Feb 22, 2024
@davidhewitt
Copy link
Contributor

davidhewitt commented Feb 26, 2024

@fadedhero does a _pydantic-core.<some-platform>.pyd file exist inside C:\Users\[user]\AppData\Roaming\IBM\SPSS Statistics\one\Python310\Lib\site-packages\pydantic_core\ ?

What does the EXT_SUFFIX config variable give you? Does it match <some-platform>? For example, I get:

$ python -c 'import sysconfig; print(sysconfig.get_config_var("EXT_SUFFIX"))'
.cpython-312-x86_64-linux-gnu.so

@fadedhero
Copy link
Author

Ahh the problem was that I installed the modules with Python Version 3.12.0 and just moved it to the SPSS Python3.10 environment path.

SPSS ouput for EXT_SUFFIX gives me: .cp310-win_amd64.pyd, which is correct now when I install it with SPSSs Python 3.10

@davidhewitt thanks alot!

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

No branches or pull requests

2 participants