Add numpy.get_include() argument to setuptools without preinstalled numpy

后端 未结 3 1900
时光取名叫无心
时光取名叫无心 2020-11-30 10:03

I am currently developing a python package that uses cython and numpy and I want the package to be installable using the pip install c

3条回答
  •  旧巷少年郎
    2020-11-30 10:51

    I found a very easy solution in this post:

    Or you can stick to https://github.com/pypa/pip/issues/5761. Here you install cython and numpy using setuptools.dist before actual setup:

    from setuptools import dist
    dist.Distribution().fetch_build_eggs(['Cython>=0.15.1', 'numpy>=1.10'])
    

    Works well for me!

提交回复
热议问题