error during the installation #382
Unanswered
popstar0426
asked this question in
Installation
Replies: 3 comments 6 replies
-
The actual error is
Please make sure swig is installed correctly. The PyPI package is not currently tested so if it does not work, we recommend installing via your system package manager. |
Beta Was this translation helpful? Give feedback.
4 replies
-
Dear all:
pip uninstall swig
sudo apt-get install swig
use the swig in system, not in conda.
Best regards!
…------------------ 原始邮件 ------------------
发件人: "mdolab/pyoptsparse" ***@***.***>;
发送时间: 2024年2月29日(星期四) 中午12:39
***@***.***>;
***@***.******@***.***>;
主题: Re: [mdolab/pyoptsparse] error during the installation (Discussion #382)
Hi @popstar0426 how did you solve the problem? I am facing the same issue. Could you please let me know?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
No, the regression test stopped at "DATurboFoamSubsonic: Failed!" .
Best regards!
…------------------ 原始邮件 ------------------
发件人: "mdolab/pyoptsparse" ***@***.***>;
发送时间: 2024年3月2日(星期六) 凌晨0:21
***@***.***>;
***@***.******@***.***>;
主题: Re: [mdolab/pyoptsparse] error during the installation (Discussion #382)
One more question, were you able to successfully run DaFoam regression tests on ubuntu virtual box?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
During the installaton of DAfoam, there was only one error shown during the build of pyoptsparse 2.10.1.
happy@happy-VirtualBox:
/dafoam/repos/pyoptsparse-2.10.1$ pip install wheel/dafoam/repos/pyoptsparse-2.10.1$ pip install swigLooking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: wheel in /home/happy/dafoam/packages/miniconda3/lib/python3.8/site-packages (0.36.2)
happy@happy-VirtualBox:
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: swig in /home/happy/dafoam/packages/miniconda3/lib/python3.8/site-packages (4.1.1)
happy@happy-VirtualBox:~/dafoam/repos/pyoptsparse-2.10.1$ pip install .
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing /home/happy/dafoam/repos/pyoptsparse-2.10.1
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [146 lines of output]
ninja: Entering directory `/home/happy/dafoam/repos/pyoptsparse-2.10.1/meson_build'
[1/77] Compiling C object pyoptsparse/pyIPOPT/pyipoptcore.cpython-38-x86_64-linux-gnu.so.p/src_pyipoptcoremodule.c.o
In file included from /tmp/pip-build-env-ud2ltx9g/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,
from /tmp/pip-build-env-ud2ltx9g/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /tmp/pip-build-env-ud2ltx9g/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from ../pyoptsparse/pyIPOPT/src/hook.h:7,
from ../pyoptsparse/pyIPOPT/src/pyipoptcoremodule.c:9:
/tmp/pip-build-env-ud2ltx9g/overlay/lib/python3.8/site-packages/numpy/core/include/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 "
| ^~~~~~~
../pyoptsparse/pyIPOPT/src/pyipoptcoremodule.c: In function ‘set_intermediate_callback’:
../pyoptsparse/pyIPOPT/src/pyipoptcoremodule.c:509:15: warning: variable ‘myowndata’ set but not used [-Wunused-but-set-variable]
509 | DispatchData myowndata;
| ^~~~~~~~~
[2/77] Compiling C object pyoptsparse/pyIPOPT/pyipoptcore.cpython-38-x86_64-linux-gnu.so.p/src_callback.c.o
In file included from /tmp/pip-build-env-ud2ltx9g/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,
from /tmp/pip-build-env-ud2ltx9g/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /tmp/pip-build-env-ud2ltx9g/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from ../pyoptsparse/pyIPOPT/src/hook.h:7,
from ../pyoptsparse/pyIPOPT/src/callback.c:36:
/tmp/pip-build-env-ud2ltx9g/overlay/lib/python3.8/site-packages/numpy/core/include/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 "
| ^~~~~~~
[3/77] Generating pyoptsparse/pyNSGA2/nsga2_wrap.c with a custom command
FAILED: pyoptsparse/pyNSGA2/nsga2_wrap.c
/home/happy/dafoam/packages/miniconda3/bin/swig -o pyoptsparse/pyNSGA2/nsga2_wrap.c -python -interface nsga2 ../pyoptsparse/pyNSGA2/source/swig/nsga2.i
Traceback (most recent call last):
File "/home/happy/dafoam/packages/miniconda3/bin/swig", line 5, in
from swig import swig
ModuleNotFoundError: No module named 'swig'
[4/77] Linking target pyoptsparse/pyIPOPT/pyipoptcore.cpython-38-x86_64-linux-gnu.so
[5/77] Generating pyoptsparse/pySLSQP/slsqpmodule.c with a custom command
Reading fortran codes...
Reading file '../pyoptsparse/pySLSQP/source/f2py/slsqp.pyf' (format:free)
Post-processing...
Block: slsqp__user__routines
Block: slsqp_user_interface
Block: slfunc
Block: slgrad
Block: slsqp
Block: slsqp
In: ../pyoptsparse/pySLSQP/source/f2py/slsqp.pyf:slsqp:unknown_interface:slsqp
get_useparameters: no module slsqp__user__routines info used by slsqp
Block: openunit
Block: pyflush
Block: closeunit
Post-processing (stage 2)...
Building modules...
Constructing call-back function "cb_slfunc_in_slsqp__user__routines"
def slfunc(m,meq,la,n,f,c,x): return f,c
Constructing call-back function "cb_slgrad_in_slsqp__user__routines"
def slgrad(m,meq,la,n,f,c,g,a,x): return g,a
Building module "slsqp"...
Constructing wrapper function "slsqp"...
a = slsqp(m,meq,la,n,x,xl,xu,f,c,g,a,acc,iter,iprint,iout,ifile,mode,w,l_w,jw,l_jw,nfunc,ngrad,slfunc,slgrad,[slfunc_extra_args,slgrad_extra_args])
Constructing wrapper function "openunit"...
ierror = openunit(unitnum,filename,filestatus,fileaction)
Constructing wrapper function "pyflush"...
pyflush(unitnum)
Constructing wrapper function "closeunit"...
closeunit(unitnum)
Wrote C/API module "slsqp" to file "pyoptsparse/pySLSQP/slsqpmodule.c"
[6/77] Generating pyoptsparse/pyCONMIN/conminmodule.c with a custom command
Reading fortran codes...
Reading file '../pyoptsparse/pyCONMIN/source/f2py/conmin.pyf' (format:free)
Line #97 in ../pyoptsparse/pyCONMIN/source/f2py/conmin.pyf:" return "
crackline:3: No pattern for line
Post-processing...
Block: conmin__user__routines
Block: conmin_user_interface
Block: cnmnfun
Block: cnmngrd
Block: conmin
{}
In: ../pyoptsparse/pyCONMIN/source/f2py/conmin.pyf:conmin:unknown_interface:conmin
vars2fortran: No typespec for argument "ndv_".
{}
In: ../pyoptsparse/pyCONMIN/source/f2py/conmin.pyf:conmin:unknown_interface:conmin
vars2fortran: No typespec for argument "ncon_".
Block: conmin
In: ../pyoptsparse/pyCONMIN/source/f2py/conmin.pyf:conmin:unknown_interface:conmin
get_useparameters: no module conmin__user__routines info used by conmin
Block: openunit
Block: pyflush
Block: closeunit
Post-processing (stage 2)...
Building modules...
Constructing call-back function "cb_cnmnfun_in_conmin__user__routines"
def cnmnfun(n1,n2,x,aobj,g): return aobj,g
Constructing call-back function "cb_cnmngrd_in_conmin__user__routines"
def cnmngrd(n1,n2,x,aobj,g,ct,df,a,ic,nac): return df,a,ic,nac
Building module "conmin"...
Constructing wrapper function "conmin"...
conmin(ndv_,ncon_,x_,vlb_,vub_,obj_,g_,n1,n2,n3,n4,n5,iprint_,iout_,ifile,itmax_,delfun_,dabfun_,itrm_,nfeasct_,nfdg_,nfun_,ngrd_,cnmnfun,cnmngrd,[cnmnfun_extra_args,cnmngrd_extra_args])
Constructing wrapper function "openunit"...
ierror = openunit(unitnum,filename,filestatus,fileaction)
Constructing wrapper function "pyflush"...
pyflush(unitnum)
Constructing wrapper function "closeunit"...
closeunit(unitnum)
Constructing COMMON block support for "varable"...
aobj
Constructing COMMON block support for "output"...
iout
Constructing COMMON block support for "cnmn1"...
delfun,dabfun,fdch,fdchm,ct,ctmin,ctl,ctlmin,alphax,abobj1,theta,obj,ndv,ncon,nside,iprint,nfdg,nscal,linobj,itmax,itrm,icndir,igoto,nac,info,infog,iter
Wrote C/API module "conmin" to file "pyoptsparse/pyCONMIN/conminmodule.c"
Fortran 77 wrappers are saved to "pyoptsparse/pyCONMIN/conmin-f2pywrappers.f"
[7/77] Compiling C object pyoptsparse/pySLSQP/slsqp.cpython-38-x86_64-linux-gnu.so.p/.._fortranobject.c.o
In file included from /tmp/pip-build-env-ud2ltx9g/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,
from /tmp/pip-build-env-ud2ltx9g/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /tmp/pip-build-env-ud2ltx9g/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from /tmp/pip-build-env-ud2ltx9g/overlay/lib/python3.8/site-packages/numpy/f2py/src/fortranobject.h:13,
from ../pyoptsparse/fortranobject.c:2:
/tmp/pip-build-env-ud2ltx9g/overlay/lib/python3.8/site-packages/numpy/core/include/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 "
| ^~~~~~~
[8/77] Compiling C object pyoptsparse/pyCONMIN/conmin.cpython-38-x86_64-linux-gnu.so.p/.._fortranobject.c.o
In file included from /tmp/pip-build-env-ud2ltx9g/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,
from /tmp/pip-build-env-ud2ltx9g/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /tmp/pip-build-env-ud2ltx9g/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from /tmp/pip-build-env-ud2ltx9g/overlay/lib/python3.8/site-packages/numpy/f2py/src/fortranobject.h:13,
from ../pyoptsparse/fortranobject.c:2:
/tmp/pip-build-env-ud2ltx9g/overlay/lib/python3.8/site-packages/numpy/core/include/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 "
| ^~~~~~~
ninja: build stopped: subcommand failed.
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /tmp/pip-build-env-ud2ltx9g/overlay/bin/ninja -C /home/happy/dafoam/repos/pyoptsparse-2.10.1/meson_build
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Code versions
Beta Was this translation helpful? Give feedback.
All reactions