Skip to content

Make the user experience of installing enable from PyPI better #769

@rahulporuri

Description

@rahulporuri

At the moment, installing enable from PyPI can be incredibly complicated and bug-ridden. For example, here is what happens when I create a new edm environment and do python -m pip install enable

  1. Installation fails with the error ModuleNotFoundError: No module named 'Cython'
  2. When I edm install cython and retry pip installing enable, installation fails with the error ModuleNotFoundError: No module named 'numpy'
  3. When I edm install numpy and retry pip installing enable, installation proceeds slightly further but it fails again with the error error: command 'swig.exe' failed: No such file or directory.
  4. swig cannot be installed from pypi so the user will need to use the operating system package manager or a third party package manager to install swig, assuming that the user doesn't want to use edm. Just asking the package manager for swig will probably install the latest version of swig i.e. version 4. Pip installing enable after installing swig will work - but it will be subtly broken because enable needs swig version 3, not version 4. Ref issue SWIG 4.0 appears to break the kiva.agg backend #360 (comment)

These issues are not documented well and put together, create a high barrier for users who try to pip install enable.

We could improve the user experience by doing two things -

  1. Use pyproject.toml to specify the build dependencies i.e. cython and numpy
  2. We cannot specify swig as a build dependency in the toml file but we can check the version of swig being used to build enable/kiva in the setup.py file - and raise an exception if swig version 3 isnt being used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions