-
Notifications
You must be signed in to change notification settings - Fork 19
Description
easy_install and pip have conflicting way of handling namespaced packages (diffpy functions as a namespace only and is not a real package) and a mixed installation then may not work:
$ conda create -n xx36 -c diffpy diffpy.utils
$ conda activate xx36
$ python -c 'import diffpy.utils' # OK
$ pip install https://github.com/diffpy/diffpy.pdfmorph/archive/master.tar.gz
$ python -c 'import diffpy.utils' # FAILS
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'diffpy.utils'
This actually happens because of an outdated definition of namespace package in diffpy/init.py which is specific to setuptools (easy_install) and does not work well with pip. Other diffpy packages have that code updated, e.g., diffpy.structure/src/diffpy/init.py, and then it seems to work with both easy_install and pip.
fix namespace package handling in diffpy/init.py as in diffpy.structure and
check if mixed easy_install, pip installation of several diffpy packages works OK
and if it does, update README to suggest pip as the installation tool