[scikit-image] Installing from pypi tarball without cython

Matthew McCormick matthew.m.mccormick at gmail.com
Fri Jul 27 13:31:36 EDT 2018


Hi Stuart,

I created a PR to address this issue here:

  https://github.com/scikit-image/scikit-image/pull/3295

Hope this helps,
Matt

On Fri, Jul 27, 2018 at 7:24 AM Stuart Mumford <stuart at cadair.com> wrote:

> Hi Egor,
>
> Thanks for the response. I have no issues with compiling the C code, I
> have a
> full compile chain setup on the machine etc. What I was expecting to
> happen is
> that the C code generated by Cython would be included in the tarball and
> therefore not need Cython to build from a tarball.
>
> This assumption is mainly based on the error that was printed:
> "RuntimeError:
> Cython >= 0.23 is required to build scikit-image from git checkout" which
> indicates (and the fact it's not in the package requirements) Cython
> should
> not be needed to build from PyPI.
>
> I hope that makes it a little clearer,
> Thanks again,
> Stuart
>
> On Friday, 27 July 2018 12:02:46 BST Egor Panfilov wrote:
> > Hi Stuart,
> >
> > I don't think what you are experiencing is an issue. Several components
> > (i.e. functions) of `scikit-image` are implemented in Cython, and require
> > it in order to be build and linked with Python API. "Binary"
> distributions
> > of `scikit-image` (including the PyPi .whl-files) ship such components
> > pre-built, so the requirements for running `scikit-image` and building it
> > are different. You can take a look at the requirements for different
> > usecases (building package, executing package, building gallery, etc) in
> > our repository in
> > https://github.com/scikit-image/scikit-image/tree/master/requirements .
> > If you are only interested in installing `scikit-image`, I'd you
> recommend
> > you to use the provided pre-built distributions available for the most
> > popular architectures and operating systems:
> >     pip install --no-cache-dir scikit-image
> >
> > Regards,
> > Egor
> >
> > On Fri, 27 Jul 2018 at 13:28, Stuart Mumford <stuart at cadair.com> wrote:
> > > Hello,
> > >
> > >
> > >
> > > I have just run into an error while trying to install scikit-image from
> > > the pip tarball on linux (as part of the SunPy test infrastructure). It
> > > seems that the PyPI tarball needs Cython to be installed:
> > >
> > >
> > >
> > >  pip install --no-binary=:all: --no-cache-dir scikit-image
> > > Collecting scikit-image
> > >
> > >  Downloading
> > >
> > >
> https://files.pythonhosted.org/packages/fc/20/d3e736493b16e9455ce8579722d6
> > > 44b313814c599d5824d34e448845f746/scikit-image-0.14.0.tar.gz (27.0MB)
> > >
> > >    100% |████████████████████████████████| 27.0MB 5.9MB/s
> > >    Complete output from command python setup.py egg_info:
> > >    Partial import of skimage during the build process.
> > >
> > >    Traceback (most recent call last):
> > >      File "/tmp/pip-install-ypyllick/scikit-image/skimage/_build.py",
> line
> > >
> > > 30, in cython
> > >
> > >        from Cython import __version__
> > >
> > >    ModuleNotFoundError: No module named 'Cython'
> > >
> > >    During handling of the above exception, another exception occurred:
> > >
> > >    Traceback (most recent call last):
> > >      File "<string>", line 1, in <module>
> > >      File "/tmp/pip-install-ypyllick/scikit-image/setup.py", line 149,
> in
> > >
> > > <module>
> > >
> > >        **extra
> > >
> > >      File
> > >
> > >
> "/opt/miniconda/envs/clean/lib/python3.7/site-packages/numpy/distutils/cor
> > > e.py", line 135, in setup
> > >
> > >        config = configuration()
> > >
> > >      File "/tmp/pip-install-ypyllick/scikit-image/setup.py", line 70,
> in
> > >
> > > configuration
> > >
> > >        config.add_subpackage('skimage')
> > >
> > >      File
> > >
> > >
> "/opt/miniconda/envs/clean/lib/python3.7/site-packages/numpy/distutils/mis
> > > c_util.py", line 1034, in add_subpackage
> > >
> > >        caller_level = 2)
> > >
> > >      File
> > >
> > >
> "/opt/miniconda/envs/clean/lib/python3.7/site-packages/numpy/distutils/mis
> > > c_util.py", line 1003, in get_subpackage
> > >
> > >        caller_level = caller_level + 1)
> > >
> > >      File
> > >
> > >
> "/opt/miniconda/envs/clean/lib/python3.7/site-packages/numpy/distutils/mis
> > > c_util.py", line 940, in _get_configuration_from_setup_py
> > >
> > >        config = setup_module.configuration(*args)
> > >
> > >      File "skimage/setup.py", line 14, in configuration
> > >
> > >        config.add_subpackage('feature')
> > >
> > >      File
> > >
> > >
> "/opt/miniconda/envs/clean/lib/python3.7/site-packages/numpy/distutils/mis
> > > c_util.py", line 1034, in add_subpackage
> > >
> > >        caller_level = 2)
> > >
> > >      File
> > >
> > >
> "/opt/miniconda/envs/clean/lib/python3.7/site-packages/numpy/distutils/mis
> > > c_util.py", line 1003, in get_subpackage
> > >
> > >        caller_level = caller_level + 1)
> > >
> > >      File
> > >
> > >
> "/opt/miniconda/envs/clean/lib/python3.7/site-packages/numpy/distutils/mis
> > > c_util.py", line 940, in _get_configuration_from_setup_py
> > >
> > >        config = setup_module.configuration(*args)
> > >
> > >      File "skimage/feature/setup.py", line 22, in configuration
> > >
> > >        cython(['_haar.pyx'], working_path=base_path)
> > >
> > >      File "/tmp/pip-install-ypyllick/scikit-image/skimage/_build.py",
> line
> > >
> > > 42, in cython
> > >
> > >        % CYTHON_VERSION)
> > >
> > >    RuntimeError: Cython >= 0.23 is required to build scikit-image from
> git
> > >
> > > checkout
> > >
> > >    Cython >= 0.23 not found; falling back to pre-built geometry.c
> > >    Cython >= 0.23 not found; falling back to pre-built transform.c
> > >    Cython >= 0.23 not found; falling back to pre-built interpolation.c
> > >    Cython >= 0.23 not found; falling back to pre-built _draw.c
> > >    Cython >= 0.23 not found; falling back to pre-built corner_cy.c
> > >    Cython >= 0.23 not found; falling back to pre-built censure_cy.c
> > >    Cython >= 0.23 not found; falling back to pre-built orb_cy.c
> > >    Cython >= 0.23 not found; falling back to pre-built brief_cy.c
> > >    Cython >= 0.23 not found; falling back to pre-built _texture.c
> > >    Cython >= 0.23 not found; falling back to pre-built
> _hessian_det_appx.c
> > >    Cython >= 0.23 not found; falling back to pre-built _hoghistogram.c
> > >
> > >    ----------------------------------------
> > >
> > > Command "python setup.py egg_info" failed with error code 1 in
> > > /tmp/pip-install-ypyllick/scikit-image/
> > >
> > > I don't know if this is a bug in the tarball / setup machinery or if
> it's
> > > some silly mistake I am making.
> > >
> > >
> > >
> > > Thanks for any help,
> > >
> > > Stuart
> > > _______________________________________________
> > > scikit-image mailing list
> > > scikit-image at python.org
> > > https://mail.python.org/mailman/listinfo/scikit-image
>
>
>
>
> _______________________________________________
> scikit-image mailing list
> scikit-image at python.org
> https://mail.python.org/mailman/listinfo/scikit-image
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20180727/23dab4ea/attachment-0001.html>


More information about the scikit-image mailing list