treverhines / RBF

Python package containing the tools necessary for radial basis function (RBF) applications
MIT License
215 stars 50 forks source link

Problem while installing #3

Closed lucasbinsfeld closed 6 years ago

lucasbinsfeld commented 6 years ago

Hi Trever,

I am having a problem while executing the "python setup.py install" command line. It ends up with a fatal error as follow: "/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c rbf/halton.c -o build/temp.macosx-10.6-intel-3.6/rbf/halton.o rbf/halton.c:579:10: fatal error: 'numpy/arrayobject.h' file not found

include "numpy/arrayobject.h"

     ^

1 error generated. error: command '/usr/bin/clang' failed with exit status 1"

I updated the numpy, scipy, sympy, cython, and networkx python packages but it's still throwing me this error while trying to install the RBF package.

Do you know how I can fix this?

Regards, Lucas

lucasbinsfeld commented 6 years ago

Hi again Trever,

I found a way to get it to work. I added this piece of code at the end of the 4 extension lines in setup.py: ,include_dirs=[numpy.get_include()])]

So setup.py looks like that now:

!/usr/bin/env python

if name == 'main': from setuptools import setup from setuptools.extension import Extension from Cython.Build import cythonize import numpy ext = [] ext += [Extension(name='rbf.halton',sources=['rbf/halton.pyx'],include_dirs=[numpy.get_include()])] ext += [Extension(name='rbf.misc.bspline',sources=['rbf/misc/bspline.pyx'],include_dirs=[numpy.get_include()])] ext += [Extension(name='rbf.geometry',sources=['rbf/geometry.pyx'],include_dirs=[numpy.get_include()])] ext += [Extension(name='rbf.poly',sources=['rbf/poly.pyx'],include_dirs=[numpy.get_include()])] setup(name='RBF', version='1.2', description='Package containing the tools necessary for radial basis function (RBF) applications', author='Trever Hines', author_email='treverhines@gmail.com', url='www.github.com/treverhines/RBF', packages=['rbf','rbf.misc'], ext_modules=cythonize(ext), license='MIT')

I got few warnings during the installation procedure but it went through completely and I can use the RBF package on both P2.7 and P3.6.

Regards, Lucas

treverhines commented 6 years ago

Hi Lucas,

I am glad that you were able to get it working. I am now wondering why my system has no problem finding arrayobject.h during compilation, even though I do not specify the location of the numpy header files. But anyways, I updated the master branch to include your modifications.

Thanks, Trever

lucasbinsfeld commented 6 years ago

Hi Trever,

You're welcome.

I implemented this in the setup.py file but I have no idea why I needed to specify the location of the numpy header files either. This could come somehow from the fact that I am using 2 versions of Python located at 2 different places, but still the specification shouldn't need to be made as each distribution of Python is linked to its own packages.

If you find anything on this matter, please let me know.

Have a nice day, Lucas


Lucas Binsfeld PhD Fellow in Mechanics and Materials Funded by IRC and Bombardier Aerospace Belfast School of Mechanical and Materials Engineering Engineering and Materials Science Centre Centre of Adhesion and Adhesives University College Dublin Belfield, Dublin 4 Ireland

On 18 April 2018 at 15:19, Trever Hines notifications@github.com wrote:

Closed #3 https://github.com/treverhines/RBF/issues/3.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/treverhines/RBF/issues/3#event-1581563214, or mute the thread https://github.com/notifications/unsubscribe-auth/AkthyMP6FRoyXjNHTOJOgWWd5hjVDGrKks5tp0uBgaJpZM4TZ1Do .

lucasbinsfeld commented 6 years ago

Hi again Trever,

A quick question: do you happen to have some kind of a user guide by any chance?

I'm having a hard time fitting my interpolated data using RBF with my original data.

Regards, Lucas


Lucas Binsfeld PhD Fellow in Mechanics and Materials Funded by IRC and Bombardier Aerospace Belfast School of Mechanical and Materials Engineering Engineering and Materials Science Centre Centre of Adhesion and Adhesives University College Dublin Belfield, Dublin 4 Ireland

On 18 April 2018 at 15:25, Lucas Binsfeld lucas.binsfeld@ucdconnect.ie wrote:

Hi Trever,

You're welcome.

I implemented this in the setup.py file but I have no idea why I needed to specify the location of the numpy header files either. This could come somehow from the fact that I am using 2 versions of Python located at 2 different places, but still the specification shouldn't need to be made as each distribution of Python is linked to its own packages.

If you find anything on this matter, please let me know.

Have a nice day, Lucas


Lucas Binsfeld PhD Fellow in Mechanics and Materials Funded by IRC and Bombardier Aerospace Belfast School of Mechanical and Materials Engineering Engineering and Materials Science Centre Centre of Adhesion and Adhesives University College Dublin Belfield, Dublin 4 Ireland

On 18 April 2018 at 15:19, Trever Hines notifications@github.com wrote:

Closed #3 https://github.com/treverhines/RBF/issues/3.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/treverhines/RBF/issues/3#event-1581563214, or mute the thread https://github.com/notifications/unsubscribe-auth/AkthyMP6FRoyXjNHTOJOgWWd5hjVDGrKks5tp0uBgaJpZM4TZ1Do .

treverhines commented 6 years ago

The documentation for rbf interpolation is here:

http://rbf.readthedocs.io/en/latest/interpolate.html

lucasbinsfeld commented 6 years ago

I'll look into it then. Thanks.

On 18 April 2018 at 22:20, Trever Hines notifications@github.com wrote:

The documentation for rbf interpolation is here:

http://rbf.readthedocs.io/en/latest/interpolate.html

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/treverhines/RBF/issues/3#issuecomment-382533053, or mute the thread https://github.com/notifications/unsubscribe-auth/AkthyF019B5YAoEGEI_hcSZ5Rvvl6SEhks5tp64GgaJpZM4TZ1Do .