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

Binary Python modules such as _ctypes or _ssl fail to load on Windows with Python 3.11.1 #44

Open
mmomtchev opened this issue Dec 19, 2022 · 1 comment

Comments

@mmomtchev
Copy link
Owner

Error: Python exception: No module named '_ctypes'
    at pymport (D:\a\pymport\pymport\proxified\index.js:22:44)
    at Suite.<anonymous> (D:\a\pymport\pymport\test\proxy.test.ts:7:21)
    at Object.create (D:\a\pymport\pymport\node_modules\mocha\lib\interfaces\common.js:148:19)
    at context.describe.context.context (D:\a\pymport\pymport\node_modules\mocha\lib\interfaces\bdd.js:42:27)
    at Object.<anonymous> (D:\a\pymport\pymport\test\proxy.test.ts:5:1)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module.m._compile (D:\a\pymport\pymport\node_modules\ts-node\src\index.ts:1618:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Object.require.extensions.<computed> [as .ts] (D:\a\pymport\pymport\node_modules\ts-node\src\index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.exports.requireOrImport (D:\a\pymport\pymport\node_modules\mocha\lib\nodejs\esm-utils.js:49:16)
    at async Object.exports.loadFilesAsync (D:\a\pymport\pymport\node_modules\mocha\lib\nodejs\esm-utils.js:91:[20](https://github.com/mmomtchev/pymport/actions/runs/3732763183/jobs/6332653301#step:10:21))
    at async singleRun (D:\a\pymport\pymport\node_modules\mocha\lib\cli\run-helpers.js:1[25](https://github.com/mmomtchev/pymport/actions/runs/3732763183/jobs/6332653301#step:10:26):3)
    at async Object.exports.handler (D:\a\pymport\pymport\node_modules\mocha\lib\cli\run.js:370:5)

Caused by python/cpython#100320

@mmomtchev
Copy link
Owner Author

Workaround is to manually set PYTHONHOME to C:\Program Files\Python311 or wherever Python 3.11.1 is installed

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

1 participant