Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: f2py doesn't work on CPython 3.12 #24444

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

Closed
skirpichev opened this issue Aug 18, 2023 · 1 comment · Fixed by #24532
Closed

BUG: f2py doesn't work on CPython 3.12 #24444

skirpichev opened this issue Aug 18, 2023 · 1 comment · Fixed by #24532

Comments

@skirpichev
Copy link

Describe the issue:

I got ModuleNotFoundError: No module named 'numpy.distutils'.

Probably, this coming with #23981 (transition to Meson), but I don't think that issue tracks the problem. Sorry if this is still a duplicate:(

Reproduce the code example:

$ touch a.f
$ python -m numpy.f2py -c a.f -m a

Error message:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/sk/venv/dev3.12/lib/python3.12/site-packages/numpy/f2py/__main__.py", line 5, in <module>
    main()
  File "/home/sk/venv/dev3.12/lib/python3.12/site-packages/numpy/f2py/f2py2e.py", line 702, in main
    run_compile()
  File "/home/sk/venv/dev3.12/lib/python3.12/site-packages/numpy/f2py/f2py2e.py", line 630, in run_compile
    from numpy.distutils.system_info import get_info
ModuleNotFoundError: No module named 'numpy.distutils'

Runtime information:

1.26.0b1
3.12.0rc1+ (heads/3.12:931df0a47c, Aug 18 2023, 10:14:11) [GCC 10.2.1 20210110]
WARNING: threadpoolctl not found in system! Install it by pip install threadpoolctl. Once installed, try np.show_runtime again for more detailed build information
[{'numpy_version': '1.26.0b1',
'python': '3.12.0rc1+ (heads/3.12:931df0a47c, Aug 18 2023, 10:14:11) [GCC '
'10.2.1 20210110]',
'uname': uname_result(system='Linux', node='note', release='5.10.0-24-amd64', version='#1 SMP Debian 5.10.179-5 (2023-08-08)', machine='x86_64')},
{'simd_extensions': {'baseline': ['SSE', 'SSE2', 'SSE3'],
'found': ['SSSE3', 'SSE41', 'POPCNT', 'SSE42'],
'not_found': ['AVX',
'F16C',
'FMA3',
'AVX2',
'AVX512F',
'AVX512CD',
'AVX512_KNL',
'AVX512_KNM',
'AVX512_SKX',
'AVX512_CLX',
'AVX512_CNL',
'AVX512_ICL']}}]
None

Context for the issue:

No response

@rgommers rgommers added this to the 1.26.0 release milestone Aug 18, 2023
@rgommers
Copy link
Member

This is a problem indeed, thanks for the report @skirpichev.

This was supposed to be fixed by gh-22225 I think, but that never got finished. This may be blocking for the 1.26.0 release, at a minimum at needs a decision. So I added that milestone. And will ping on the PR.

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

Successfully merging a pull request may close this issue.

3 participants