You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Installation fails with the error ModuleNotFoundError: No module named 'Cython'
When I edm install cython and retry pip installing enable, installation fails with the error ModuleNotFoundError: No module named 'numpy'
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.
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 -
Use pyproject.toml to specify the build dependencies i.e. cython and numpy
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.
At the moment, installing
enablefrom PyPI can be incredibly complicated and bug-ridden. For example, here is what happens when I create a new edm environment and dopython -m pip install enableModuleNotFoundError: No module named 'Cython'cythonand retry pip installingenable, installation fails with the errorModuleNotFoundError: No module named 'numpy'numpyand retry pip installingenable, installation proceeds slightly further but it fails again with the errorerror: command 'swig.exe' failed: No such file or directory.swigcannot be installed from pypi so the user will need to use the operating system package manager or a third party package manager to installswig, assuming that the user doesn't want to use edm. Just asking the package manager forswigwill probably install the latest version of swig i.e. version 4. Pip installingenableafter installingswigwill work - but it will be subtly broken becauseenableneeds 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 -
pyproject.tomlto specify the build dependencies i.e.cythonandnumpyswigas a build dependency in the toml file but we can check the version of swig being used to buildenable/kivain thesetup.pyfile - and raise an exception if swig version 3 isnt being used.