Behavior reproducible on a clean Python 3.11 install (as well as 3.12) as well as including --no-build-isolation (or not) to the pip install command:
(sofind) [jaejoonk@tri-login02 ~]$ python3
Python 3.11.4 (main, Nov 4 2023, 03:43:13) [GCC 12.3.1 20230526] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sofind
>>> from sofind import DataModel
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'DataModel' from 'sofind' (unknown location)
>>> print(sofind)
<module 'sofind' (<_frozen_importlib_external.NamespaceLoader object at 0x7fda42f98c90>)>
sofind.DataModel is unable to be found even though other sub-modules are:
>>> from sofind import products
>>> products
<module 'sofind.products' from '/home/jaejoonk/modules/sofind/sofind/products/__init__.py'>
>>> from sofind import DataModel
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'DataModel' from 'sofind' (unknown location)
The issue is circumvented by adding the path to the sofind module's root directory to the user's PYTHONPATH.
Behavior reproducible on a clean Python 3.11 install (as well as 3.12) as well as including
--no-build-isolation(or not) to the pip install command:sofind.DataModelis unable to be found even though other sub-modules are:The issue is circumvented by adding the path to the sofind module's root directory to the user's PYTHONPATH.