Maybe I don't understand the flow, but I can't manage to install dependencies to setup.py
file before the script is actually run. My guess was that providing a setup_requires
option to the setup.py
file would install modules required by the setup file so that I can import them. Here my file:
import os
import numpy
from Cython.Build import cythonize
from setuptools import setup, Extension
# Cython library
ext = [Extension('sp.filters', # location of the resulting .so
['sp/filters.pyx'],
include_dirs=[numpy.get_include()])]
setup(name='Filters',
description="BlahBlah",
long_description="BlahBlahBlah",
packages=['filters'],
ext_modules=cythonize(ext),
setup_requires=[
'cython',
'numpy,
'setuptools'
],
install_requires=['numpy',
'numba',
'scipy',]
)
But I get the following error:
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-uck5sw58/setup.py", line 8, in <module>
import numpy
ModuleNotFoundError: No module named 'numpy'