[scikit-image] Installing from pypi tarball without cython

Steven Silvester steven.silvester at gmail.com
Fri Jul 27 07:09:57 EDT 2018


It is possible to make this work a bit better, see https://github.com/blink1073/tifffile/pull/45/files <https://github.com/blink1073/tifffile/pull/45/files> for an example.


Regards,

Steve



> On Jul 27, 2018, at 6:02 AM, Egor Panfilov <egor.v.panfilov at gmail.com> 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 <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 <mailto: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/d3e736493b16e9455ce8579722d644b313814c599d5824d34e448845f746/scikit-image-0.14.0.tar.gz <https://files.pythonhosted.org/packages/fc/20/d3e736493b16e9455ce8579722d644b313814c599d5824d34e448845f746/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/core.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/misc_util.py", line 1034, in add_subpackage 
>        caller_level = 2) 
>      File "/opt/miniconda/envs/clean/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 1003, in get_subpackage 
>        caller_level = caller_level + 1) 
>      File "/opt/miniconda/envs/clean/lib/python3.7/site-packages/numpy/distutils/misc_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/misc_util.py", line 1034, in add_subpackage 
>        caller_level = 2) 
>      File "/opt/miniconda/envs/clean/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 1003, in get_subpackage 
>        caller_level = caller_level + 1) 
>      File "/opt/miniconda/envs/clean/lib/python3.7/site-packages/numpy/distutils/misc_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 <mailto:scikit-image at python.org>
> https://mail.python.org/mailman/listinfo/scikit-image <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/8bd901ec/attachment.html>


More information about the scikit-image mailing list