Davide-sd / sympy-plot-backends

An improved plotting module for SymPy
BSD 3-Clause "New" or "Revised" License
42 stars 9 forks source link

Maybe a test for mayavi install should be include in setup.py? #8

Closed gutow closed 1 year ago

gutow commented 1 year ago

This may be related to https://github.com/Davide-sd/sympy-plot-backends/issues/7.

I updated the conda install for the jupyter hub I maintain to the most recent version of python it will support (3.10.3). The install of sympy-plot-backends (great tool!) failed because the mayavi pip install fails to build the wheel. However, I got it to work by installing mayavi2 on my server using the ubuntu/debian package manager system. Then pip install -U sympy-plot-backends succeeds.

Could a test for a successful install of mayavi be added to setup.py, that outputs the suggestion to install it using the system package manager if there is a failure? The mayavi python package seems to be delicate.

Davide-sd commented 1 year ago

Could a test for a successful install of mayavi be added to setup.py, that outputs the suggestion to install it using the system package manager if there is a failure? The mayavi python package seems to be delicate.

I was afraid that would happen. As I'm not an expert about maintaining a package, I'll have to dig into the setup.py documentation to verify if it's possible to catch such failures. But I'll look into it next week. Thank you for letting me know about this problem.

gutow commented 1 year ago

I am not an expert on setup, but I have used conditional installs (based on OS). You might be able to test for a valid install of mayavi2 (not sure the best way to do that across many OSes) and set some boolean as the condition for installing mayavi. You could then use that boolean to issue a warning to the user as well.

I assume your package would still work as long as mayavi is not used.

Davide-sd commented 1 year ago

I'm going to close this issue, even though I didn't solve it :( In the last few weeks it has become even harder to install Mayavi on different combinations of OS/python. Unfortunately, I don't have time to invest into this. Instead, I've removed Mayavi from the setup dependency: MayaviBackend is still available and is tested on my local machine. I've also updated the documentation (install section) letting users know that if they want to use MayaviBackend they have to install Mayavi.