Closed stoner49 closed 4 years ago
Are you using python 2 or 3? I see in the logs
#------------------------------------------------------#
Python Inclue Flags -I/usr/include/python3.6m -I/usr/include/python3.6m
#------------------------------------------------------#
#------------------------------------------------------#
Numpy Include Directory: /home/ugi/.local/lib/python2.7/site-packages/numpy/core/include
#------------------------------------------------------#
#------------------------------------------------------#
f2py root directory: /home/ugi/.local/lib/python2.7/site-packages/numpy/f2py
#------------------------------------------------------#
which indicate that the numpy package being used is inconsistent with the python version. You may need to check your PYTHONPATH.
Yes I had to use python 3, i would get a message that 2 is no longer supported or something like that.
Could you please explain in a bit more detail by what exactly do you mean by checking my PYTHONPATH?
Thanks!
So first of all, our codes do not support python3 yet, but we hope to have that ready in a few weeks.
In either case, you seem to be using numpy for python2. You need to figure out why you're importing that and not the version for python 3. A good place to start would be to check the environment variable $PYTHONPATH
, and the sys.path
value in the python prompt. You may also want to check if you actually have a numpy installation for python 3. This is a python issue that you'll have to debug on your own.
Hi,
I never did...
It was a support issue for phyton3
I figured in the end that using the docker image for my applications was sufficient and i didn't need to fix the issue in the end.
Good luck! BR
On Sun, Sep 18, 2022, 20:09 rcruzfardilha99 @.***> wrote:
Hi! Can you please tell me how did you solve this issue?
— Reply to this email directly, view it on GitHub https://github.com/mdolab/pyspline/issues/5#issuecomment-1250359265, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKELMRTMTVSY2MD5PQOEHDLV65LGFANCNFSM4MG4EU4Q . You are receiving this because you authored the thread.Message ID: @.***>
@stoner49
I am getting this error:
ake[1]: Entering directory '/home/bolseiros/packages/pyspline' mkdir -p obj ln -sf config/config.mk config.mk making module in src/
make[2]: Entering directory '/home/bolseiros/packages/pyspline/src' make precision.o adtProjections.o make[3]: Entering directory '/home/bolseiros/packages/pyspline/src' make[3]: '..//obj/precision.o' is up to date. make[3]: '..//obj/adtProjections.o' is up to date. make[3]: Leaving directory '/home/bolseiros/packages/pyspline/src' cp -f *.mod ../mod make evaluations.o basis.o knots.o insertKnot.o getBasisPt.o parameterizations.o findSpan.o compute_curve.o compute_surface.o compute_volume.o eval_curve.o eval_surface.o eval_volume.o projections.o tfi2d.o make[3]: Entering directory '/home/bolseiros/packages/pyspline/src' make[3]: '..//obj/evaluations.o' is up to date. make[3]: '..//obj/basis.o' is up to date. make[3]: '..//obj/knots.o' is up to date. make[3]: '..//obj/insertKnot.o' is up to date. make[3]: '..//obj/getBasisPt.o' is up to date. make[3]: '..//obj/parameterizations.o' is up to date. make[3]: '..//obj/findSpan.o' is up to date. make[3]: '..//obj/compute_curve.o' is up to date. make[3]: '..//obj/compute_surface.o' is up to date. make[3]: '..//obj/compute_volume.o' is up to date. make[3]: '..//obj/eval_curve.o' is up to date. make[3]: '..//obj/eval_surface.o' is up to date. make[3]: '..//obj/eval_volume.o' is up to date. make[3]: '..//obj/projections.o' is up to date. make[3]: '..//obj/tfi2d.o' is up to date. make[3]: Leaving directory '/home/bolseiros/packages/pyspline/src' make[2]: Leaving directory '/home/bolseiros/packages/pyspline/src' (cd lib && make) make[2]: Entering directory '/home/bolseiros/packages/pyspline/lib' creating library ...
ar -rvs libspline.a ../obj/*.o r - ../obj/adtProjections.o r - ../obj/basis.o r - ../obj/compute_curve.o r - ../obj/compute_surface.o r - ../obj/compute_volume.o r - ../obj/eval_curve.o r - ../obj/eval_surface.o r - ../obj/eval_volume.o r - ../obj/evaluations.o r - ../obj/findSpan.o r - ../obj/getBasisPt.o r - ../obj/insertKnot.o r - ../obj/knots.o r - ../obj/parameterizations.o r - ../obj/precision.o r - ../obj/projections.o r - ../obj/tfi2d.o
library libspline.a created.
make[2]: Leaving directory '/home/bolseiros/packages/pyspline/lib' (cd src/f2py && make) make[2]: Entering directory '/home/bolseiros/packages/pyspline/src/f2py'
Python Inclue Flags -I/usr/include/python3.8 -I/usr/include/python3.8
Numpy Include Directory: /home/bolseiros/.local/lib/python3.8/site-packages/numpy/core/include
f2py root directory: /home/bolseiros/.local/lib/python3.8/site-packages/numpy/f2py
cp f2py_f2cmap.ref .f2py_f2cmap f2py pyspline.pyf Reading f2cmap from '.f2py_f2cmap' ... Mapping "real(kind=realtype)" to "double" Successfully applied user defined f2cmap changes Reading fortran codes... Reading file 'pyspline.pyf' (format:free) Post-processing... Block: libspline Block: knots_interp Block: knots_lms Block: insertknot Block: curve_jacobian_wrap Block: constr_jac Block: poly_length Block: curve_para_corr Block: surface_jacobian_wrap Block: para3d Block: tfi2d Block: volume_jacobian_wrap Block: eval_curve Block: eval_curve_deriv Block: eval_curve_deriv2 Block: eval_curve_c Block: eval_curve_deriv_c Block: eval_curve_deriv2_c Block: eval_surface Block: eval_surface_deriv Block: eval_surface_deriv2 Block: eval_volume Block: eval_volume_deriv Block: eval_volume_deriv2 Block: point_curve Block: point_surface Block: point_volume Block: curve_curve Block: curve_surface Block: point_curve_start Block: point_surface_start Block: point_volume_start Block: curve_curve_start Block: curve_surface_start Block: line_plane Block: plane_line Block: point_plane Block: getbasisptsurface Block: getbasisptvolume Block: basis Block: derivbasis Block: findspan Block: adtprojections Block: searchquads Post-processing (stage 2)... Block: libspline Block: unknown_interface Block: knots_interp Block: knots_lms Block: insertknot Block: curve_jacobian_wrap Block: constr_jac Block: poly_length Block: curve_para_corr Block: surface_jacobian_wrap Block: para3d Block: tfi2d Block: volume_jacobian_wrap Block: eval_curve Block: eval_curve_deriv Block: eval_curve_deriv2 Block: eval_curve_c Block: eval_curve_deriv_c Block: eval_curve_deriv2_c Block: eval_surface Block: eval_surface_deriv Block: eval_surface_deriv2 Block: eval_volume Block: eval_volume_deriv Block: eval_volume_deriv2 Block: point_curve Block: point_surface Block: point_volume Block: curve_curve Block: curve_surface Block: point_curve_start Block: point_surface_start Block: point_volume_start Block: curve_curve_start Block: curve_surface_start Block: line_plane Block: plane_line Block: point_plane Block: getbasisptsurface Block: getbasisptvolume Block: basis Block: derivbasis Block: findspan Block: adtprojections Block: searchquads Building modules... Building module "libspline"... Constructing wrapper function "knots_interp"... t = knots_interp(x,deriv_ptr,k,[n,nd]) Constructing wrapper function "knots_lms"... t = knots_lms(x,nctl,k,[n]) Constructing wrapper function "insertknot"... r,t_new,coef_new,ileft = insertknot(u,r,t,k,coef,[nctl,ndim]) Constructing wrapper function "curve_jacobian_wrap"... vals,row_ptr,col_ind = curve_jacobian_wrap(s,sd,t,k,nctl,vals,row_ptr,col_ind,[n,nd]) Constructing wrapper function "constr_jac"... j_val,j_col_ind,j_row_ptr = constr_jac(a_val,a_row_ptr,a_col_ind,b_val,b_row_ptr,b_col_ind,c_val,c_row_ptr,c_col_ind,an,[am,cm,annz,bnnz,cnnz]) Constructing wrapper function "poly_length"... length = poly_length(x,[n,ndim]) Constructing wrapper function "curve_para_corr"... curve_para_corr(t,k,s,coef,length,x,[nctl,ndim,n]) Constructing wrapper function "surface_jacobian_wrap"... vals,row_ptr,col_ind = surface_jacobian_wrap(u,v,tu,tv,ku,kv,nctlu,nctlv,[nu,nv]) Constructing wrapper function "para3d"... s,u,v,w = para3d(x,[n,m,l,ndim]) Constructing wrapper function "tfi2d"... x = tfi2d(e0,e1,e2,e3,[nu,nv]) Constructing wrapper function "volume_jacobian_wrap"... vals,row_ptr,col_ind = volume_jacobian_wrap(u,v,w,tu,tv,tw,ku,kv,kw,nctlu,nctlv,nctlw,[nu,nv,nw]) Constructing wrapper function "eval_curve"... val = eval_curve(s,t,k,coef,[nctl,ndim,n]) Constructing wrapper function "eval_curve_deriv"... val = eval_curve_deriv(s,t,k,coef,[nctl,ndim]) Constructing wrapper function "eval_curve_deriv2"... val = eval_curve_deriv2(s,t,k,coef,[nctl,ndim]) Constructing wrapper function "eval_curve_c"... val = eval_curve_c(s,t,k,coef,[nctl,ndim,n]) Constructing wrapper function "eval_curve_deriv_c"... val = eval_curve_deriv_c(s,t,k,coef,[nctl,ndim]) Constructing wrapper function "eval_curve_deriv2_c"... val = eval_curve_deriv2_c(s,t,k,coef,[nctl,ndim]) Constructing wrapper function "eval_surface"... val = eval_surface(u,v,tu,tv,ku,kv,coef,[nctlu,nctlv,ndim,n,m]) Constructing wrapper function "eval_surface_deriv"... val = eval_surface_deriv(u,v,tu,tv,ku,kv,coef,[nctlu,nctlv,ndim]) Constructing wrapper function "eval_surface_deriv2"... val = eval_surface_deriv2(u,v,tu,tv,ku,kv,coef,[nctlu,nctlv,ndim]) Constructing wrapper function "eval_volume"... val = eval_volume(u,v,w,tu,tv,tw,ku,kv,kw,coef,[nctlu,nctlv,nctlw,ndim,n,m,l]) Constructing wrapper function "eval_volume_deriv"... val = eval_volume_deriv(u,v,w,tu,tv,tw,ku,kv,kw,coef,[nctlu,nctlv,nctlw,ndim]) Constructing wrapper function "eval_volume_deriv2"... val = eval_volume_deriv2(u,v,w,tu,tv,tw,ku,kv,kw,coef,[nctlu,nctlv,nctlw,ndim]) Constructing wrapper function "point_curve"... s,diff = point_curve(x0,t,k,coef,niter,eps,s,[nctl,ndim]) Constructing wrapper function "point_surface"... u,v,diff = point_surface(x0,tu,tv,ku,kv,coef,niter,eps,u,v,[nctlu,nctlv,ndim]) Constructing wrapper function "point_volume"... u,v,w,diff = point_volume(x0,tu,tv,tw,ku,kv,kw,coef,niter,eps,u,v,w,[nctlu,nctlv,nctlw,ndim]) Constructing wrapper function "curve_curve"... s,t,diff = curve_curve(t1,k1,coef1,t2,k2,coef2,niter,eps,s,t,[n1,n2,ndim]) Constructing wrapper function "curve_surface"... u,v,s,diff = curve_surface(tc,kc,coefc,tu,tv,ku,kv,coefs,niter,eps,u,v,s,[nctlc,nctlu,nctlv,ndim]) Constructing wrapper function "point_curve_start"... u = point_curve_start(x0,uu,data,[nu,ndim,n]) Constructing wrapper function "point_surface_start"... u,v = point_surface_start(x0,uu,vv,data,[nu,nv,ndim,n]) Constructing wrapper function "point_volume_start"... u,v,w = point_volume_start(x0,uu,vv,ww,data,[nu,nv,nw,ndim,n]) Constructing wrapper function "curve_curve_start"... s1,s2 = curve_curve_start(data1,uu1,data2,uu2,[nu1,nu2,ndim]) Constructing wrapper function "curve_surface_start"... s,u,v = curve_surface_start(data1,uu1,data2,uu2,vv2,[nu1,nu2,nv2,ndim]) Constructing wrapper function "line_plane"... sol,pid,n_sol = line_plane(ia,vc,p0,v1,v2,[n]) Constructing wrapper function "plane_line"... sol,n_sol = plane_line(ia,vc,p0,v1,v2,[n]) Constructing wrapper function "point_plane"... sol,n_sol,best_sol = point_plane(pt,p0,v1,v2,[n]) Constructing wrapper function "getbasisptsurface"... vals,col_ind = getbasisptsurface(u,v,tu,tv,ku,kv,vals,col_ind,istart,l_index,[nctlu,nctlv,nnz]) Constructing wrapper function "getbasisptvolume"... vals,col_ind = getbasisptvolume(u,v,w,tu,tv,tw,ku,kv,kw,vals,col_ind,istart,l_index,[nctlu,nctlv,nctlw,nnz]) Constructing wrapper function "basis"... b = basis(t,nctl,k,u,ind) Constructing wrapper function "derivbasis"... bd = derivbasis(t,nctl,ku,u,ind,n) Constructing wrapper function "findspan"... ind = findspan(u,k,t,nctl) Constructing F90 module support for "adtprojections"... Constructing wrapper function "adtprojections.searchquads"... faceid,uv = searchquads(pts,conn,searchpts,[npts,nconn,nsearchpts]) Wrote C/API module "libspline" to file "./libsplinemodule.c" Fortran 90 wrappers are saved to "./libspline-f2pywrappers2.f90"
gcc -O2 -fPIC -I/usr/include/python3.8 -I/usr/include/python3.8 -I/home/bolseiros/.local/lib/python3.8/site-packages/numpy/core/include \
-I/home/bolseiros/.local/lib/python3.8/site-packages/numpy/f2py/src -c libsplinemodule.c
In file included from /usr/include/python3.8/numpy/ndarraytypes.h:1830,
from /usr/include/python3.8/numpy/ndarrayobject.h:12,
from /usr/include/python3.8/numpy/arrayobject.h:4,
from /home/bolseiros/.local/lib/python3.8/site-packages/numpy/f2py/src/fortranobject.h:13,
from libsplinemodule.c:20:
/usr/include/python3.8/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
17 | #warning "Using deprecated NumPy API, disable it with " \
| ^~~
libsplinemodule.c: In function ‘int_from_pyobj’:
libsplinemodule.c:143:14: warning: implicit declaration of function ‘Npy__PyLong_AsInt’ [-Wimplicit-function-declaration]
143 | *v = Npy__PyLong_AsInt(obj);
| ^~~~~
libsplinemodule.c: In function ‘PyInit_libspline’:
libsplinemodule.c:9702:5: warning: implicit declaration of function ‘Py_SET_TYPE’; did you mean ‘Py_TYPE’? [-Wimplicit-function-declaration]
9702 | Py_SET_TYPE(&PyFortran_Type, &PyType_Type);
| ^~~
| Py_TYPE
gcc -O2 -fPIC -I/usr/include/python3.8 -I/usr/include/python3.8 -I/home/bolseiros/.local/lib/python3.8/site-packages/numpy/core/include -c \
/home/bolseiros/.local/lib/python3.8/site-packages/numpy/f2py/src/fortranobject.c -o fortranobject.o
In file included from /usr/include/python3.8/numpy/ndarraytypes.h:1830,
from /usr/include/python3.8/numpy/ndarrayobject.h:12,
from /usr/include/python3.8/numpy/arrayobject.h:4,
from /home/bolseiros/.local/lib/python3.8/site-packages/numpy/f2py/src/fortranobject.h:13,
from /home/bolseiros/.local/lib/python3.8/site-packages/numpy/f2py/src/fortranobject.c:2:
/usr/include/python3.8/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
17 | #warning "Using deprecated NumPy API, disable it with " \
| ^~~
gfortran -I../../mod -fdefault-real-8 -O2 -fPIC -std=f2008 -I./ -c libspline-f2pywrappers2.f90
gfortran -fPIC -shared fortranobject.o libsplinemodule.o libspline-f2pywrappers2.o -fdefault-real-8 -O2 -fPIC -std=f2008 -L../../lib -lspline -o libspline.so
python importTest.py
Testing if module pyspline can be imported...
Error importing libspline.so
make[2]: [Makefile:37: all] Error 1
make[2]: Leaving directory '/home/bolseiros/packages/pyspline/src/f2py'
make[1]: [Makefile:36: module] Error 2
make[1]: Leaving directory '/home/bolseiros/packages/pyspline'
make: *** [Makefile:7: default] Error 2
I'm running into an issue building pyspline where i get the following output with the error at the end.
All the other MDOLAB packages import and get the proper message at the end:
The problem occurs after i run make This is the output I get with the error at the end: