On Thu, Jun 9, 2016 at 7:37 AM, Elizabeth A. Fischer <elizabeth.fisc...@columbia.edu> wrote: >> Or maybe by default it can just point the user to an Installation Page >> which explains in detail what needs to be done to get those headers for >> various systems ? > > > I think having this information on an installation instruction page is > definitely a good idea. I don't think it makes sense to put in every single > error message that users should consult the installation instructions; that > should be a given.
I'm inclined to agree that putting instructions for several different systems in the message is overkill, and is a slippery slope, but a friendlier error message with links to documentation (and maybe general, non-Cython-specific docs on building Python extension modules too). > It is my belief that non-developers should not be manually building > software. Nor should developers be doing that; if you're saying > "./configure" yourself, it's like programming assembly code. > > There are many ways to install Cython without manually building: Unfortunately sometimes, especially with Python software, the line between "developer" and "non-developer" is blurry. This is especially true of scientific software where Cython finds its most use. It's not uncommon, for example, for Cython to be pulled in as a build dependency of something else. Of course as pointed out downthread this is less of an issue on most platforms now that binary wheels are available for so many (including now manylinux!). So I guess point taken that when it comes to just building Cython itself this is less of an issue than it used to be. > * If you're on Linux (and maybe Mac too), install with Spack. This can be > as easy as typing: > spack install py-cython > > https://github.com/llnl/spack > > Spack gives you complete control over your compiler. This is important if > you're building Python extensions, especially C++-based extensions, which > must be built with the same compilers use to build Python. > > I use Spack to build my complete software stack: the application software I > work on requires about 50 dependencies to build, and another ~20 Python > dependencies to analyze the output. That includes the full Numpy/Scipy > stack. Spack makes it easy for me to use consistent compiler and libraries > for Python and my libraries. I've had success making Spack-based install > instructions that others (non-developers) can follow and get my software > stack installed on their systems: > https://github.com/citibeth/icebin This one's new to me. Will have to investigate--this could be relevant to my interests. Thanks, Erik > On Wed, Jun 8, 2016 at 1:25 PM, Robert Bradshaw <rober...@gmail.com> wrote: >> >> +1, want to submit a pull request? >> >> On Tue, Jun 7, 2016 at 11:28 PM, Abdeali Kothari >> <abdealikoth...@gmail.com> wrote: >> > Hi, >> > >> > Currently, when a user installs cython, if the Python headers are not >> > found, >> > an error message saying "Python.h: no such file or directory" is shown >> > (Example: https://justpaste.it/v0gz). Would it be possible to suggest an >> > action to install the headers ? >> > >> > I found http://trac.cython.org/ticket/247 which is quite old, and makes >> > the >> > error message easier to find, but doesn't recommend a solution. >> > >> > `sys.platform`, `platform.linux_distribution` or `distro`[1] can be used >> > to >> > find which OS, platform, etc is and use that to suggest a command like: >> > >> > if sys.version_info < (3, ) and sys.platform.startswith("linux") and >> > platform.linux_distribution()[0] in ("ubuntu", "debian"): >> > print("Python headers were not found. On Debian/Ubuntu, `sudo >> > apt-get install python-dev` should install the Python headers.") >> > >> > elif sys.version_info < (3, ) and sys.platform.startswith("linux") >> > and >> > platform.linux_distribution()[0] in ("ubuntu", "debian"): >> > print("Python headers were not found. On Debian/Ubuntu, `sudo >> > apt-get install python3-dev` should install the Python3 headers.") >> > >> > This would help so that non-developers can use cython based packages >> > easily >> > as it provides helpful instructions on what to do. Currently, you >> > essentially search for the error message and go to one of the >> > forums/blogs >> > explaining what can be done. >> > >> > Or maybe by default it can just point the user to an Installation Page >> > which >> > explains in detail what needs to be done to get those headers for >> > various >> > systems ? >> > >> > [1] - https://pypi.python.org/pypi/distro >> > >> > _______________________________________________ >> > cython-devel mailing list >> > cython-devel@python.org >> > https://mail.python.org/mailman/listinfo/cython-devel >> > >> _______________________________________________ >> cython-devel mailing list >> cython-devel@python.org >> https://mail.python.org/mailman/listinfo/cython-devel > > > > _______________________________________________ > cython-devel mailing list > cython-devel@python.org > https://mail.python.org/mailman/listinfo/cython-devel > _______________________________________________ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel