PyWavelets / pywt

PyWavelets - Wavelet Transforms in Python
http://pywavelets.readthedocs.org
MIT License
1.97k stars 460 forks source link

Can't find pywt._extensions._pywt during tests #665

Closed nieder closed 1 year ago

nieder commented 1 year ago

Trying to run tests with 1.4.1, I get the following error:

ImportError while loading conftest '/sw/build.build/pywavelets-py38-1.4.1-1/PyWavelets-1.4.1/pywt/conftest.py'.
pywt/__init__.py:15: in <module>
    from ._extensions._pywt import *
E   ModuleNotFoundError: No module named 'pywt._extensions._pywt'

pywt builds fine otherwise and is present in $SOURCE_DIR/build/lib.macosx-10.14-x86_64-3.8/pywt, but no setting of PYTHONPATH finds it during tests. Not sure if the periods are supposed to be parsed somehow into / or the other way around.

macOS 10.14.6 with python3.8-3.10

nieder commented 1 year ago

Adding that I can load the installed module directly w/ no problems:

$ /sw/bin/python3.8
Python 3.8.13 (default, Jan 14 2023, 05:56:25) 
[Clang 11.0.0 (clang-1100.0.33.17)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pywt._extensions._pywt
>>> 
rgommers commented 1 year ago

This is some kind of install issue, not sure what exactly happened there. You should never have to set PYTHONPATH for things to work (if you do, path separators are those native to the platform, so / on macOS). I'd just try reinstalling with pip. The packages on PyPI and other distribution channels certainly work.

rgommers commented 1 year ago

I've just rewritten the whole build system, so there is nothing actionable here to do. Hence I closed the issue.