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
BUG: pytest fails with ModuleNotFoundError: No module named 'utils'
#26356
Comments
Those tests are in a submodule pulled in recently, and the tests cannot work without some refactoring. I wonder why our CI does not collect these and fail. @vstinner thoughts about how to work around this? Should we delete the tests? |
I wonder why pytest doesn’t see Line 3 in 3d33d5f
|
I'm not used to pytest configuration. Obviously, yes, removing tests solve the issue. |
I tried the commands at the top of the issue and the problem does not reproduce for me (on a macbook with arm64 processsor). @tuhinsharma121 could you use some of the pytest options to try to figure out why the pytest.ini is ignored? Do you have anything special in your environment? Maybe try copying the |
I pulled the latest code.
works fine from the terminal now. |
I see another problem now. It runs fine from the terminal. But when I configure pytest from pycharm it fails with following error
It looks like pytest runner in pycharm has a dependency on matplotlib. And matplotlib is built with numpy 1.0 instead 2.0. Hence giving the error. I guess I have to wait for matplotlib to build with numpy 2.0 to use pycharm pytest runner which may take time. |
Please upgrade to Matplotlib 3.8.4, that is built against NumPy 2.0. The original issue here is resolved, so I'll close this. Thanks all. |
Describe the issue:
I have followed the official build commands for editable install. But pytest fails with
ModuleNotFoundError: No module named 'utils'
Reproduce the code example:
Error message:
Python and NumPy Versions:
Python 3.11.9
-e git+ssh://git@github.com/tuhinsharma121/numpy.git@552fdd4a476c6cc99a9f985493664f7279bbff65#egg=numpy
Runtime Environment:
meson-python: building numpy: /opt/anaconda3/envs/numpy-dev/bin/ninja
[1/1] Generating numpy/generate-version with a custom command
Saving version to numpy/version.py
[{'numpy_version': '2.1.0.dev0+git20240421.552fdd4',
'python': '3.11.9 | packaged by conda-forge | (main, Apr 19 2024, 18:45:13) '
'[Clang 16.0.6 ]',
'uname': uname_result(system='Darwin', node='tuhsharm-mac', release='23.4.0', version='Darwin Kernel Version 23.4.0: Fri Mar 15 00:11:05 PDT 2024; root:xnu-10063.101.17~1/RELEASE_X86_64', machine='x86_64')},
{'simd_extensions': {'baseline': ['SSE', 'SSE2', 'SSE3', 'SSSE3'],
'found': ['SSE41',
'POPCNT',
'SSE42',
'AVX',
'F16C',
'FMA3',
'AVX2'],
'not_found': ['AVX512F',
'AVX512CD',
'AVX512_KNL',
'AVX512_SKX',
'AVX512_CLX',
'AVX512_CNL',
'AVX512_ICL']}}]
None
Context for the issue:
I want to contribute to the project. Not getting my local test work is a blocker for it.
The text was updated successfully, but these errors were encountered: