Closed athulpg007 closed 1 year ago
Tried the suggested solution here, it fixed the error: command 'x86_64-linux-gnu-gcc' failed: No such file or directory
, but runs into a different error.
Requirement already satisfied: sb-arch-opt[arch_sbo] in ./venv/lib/python3.10/site-packages (1.1.4)
Requirement already satisfied: more-itertools~=9.1 in ./venv/lib/python3.10/site-packages (from sb-arch-opt[arch_sbo]) (9.1.0)
Requirement already satisfied: ConfigSpace~=0.6.1 in ./venv/lib/python3.10/site-packages (from sb-arch-opt[arch_sbo]) (0.6.1)
Requirement already satisfied: pandas in ./venv/lib/python3.10/site-packages (from sb-arch-opt[arch_sbo]) (2.0.3)
Requirement already satisfied: deprecated in ./venv/lib/python3.10/site-packages (from sb-arch-opt[arch_sbo]) (1.2.14)
Requirement already satisfied: pymoo~=0.6.0.1 in ./venv/lib/python3.10/site-packages (from sb-arch-opt[arch_sbo]) (0.6.0.1)
Requirement already satisfied: scipy in ./venv/lib/python3.10/site-packages (from sb-arch-opt[arch_sbo]) (1.11.1)
Requirement already satisfied: numpy in ./venv/lib/python3.10/site-packages (from sb-arch-opt[arch_sbo]) (1.25.0)
Requirement already satisfied: cached-property~=1.5 in ./venv/lib/python3.10/site-packages (from sb-arch-opt[arch_sbo]) (1.5.2)
Collecting numba
Using cached numba-0.57.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.6 MB)
Collecting scikit-learn
Using cached scikit_learn-1.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB)
Collecting smt~=2.0b5
Using cached smt-2.0.tar.gz (272 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: pyparsing in ./venv/lib/python3.10/site-packages (from ConfigSpace~=0.6.1->sb-arch-opt[arch_sbo]) (3.1.0)
Requirement already satisfied: typing-extensions in ./venv/lib/python3.10/site-packages (from ConfigSpace~=0.6.1->sb-arch-opt[arch_sbo]) (4.7.1)
Requirement already satisfied: dill in ./venv/lib/python3.10/site-packages (from pymoo~=0.6.0.1->sb-arch-opt[arch_sbo]) (0.3.6)
Requirement already satisfied: cma==3.2.2 in ./venv/lib/python3.10/site-packages (from pymoo~=0.6.0.1->sb-arch-opt[arch_sbo]) (3.2.2)
Requirement already satisfied: autograd>=1.4 in ./venv/lib/python3.10/site-packages (from pymoo~=0.6.0.1->sb-arch-opt[arch_sbo]) (1.6.2)
Requirement already satisfied: alive-progress in ./venv/lib/python3.10/site-packages (from pymoo~=0.6.0.1->sb-arch-opt[arch_sbo]) (3.1.4)
Requirement already satisfied: matplotlib>=3 in ./venv/lib/python3.10/site-packages (from pymoo~=0.6.0.1->sb-arch-opt[arch_sbo]) (3.7.1)
Collecting pyDOE2
Using cached pyDOE2-1.3.0-py3-none-any.whl
Requirement already satisfied: wrapt<2,>=1.10 in ./venv/lib/python3.10/site-packages (from deprecated->sb-arch-opt[arch_sbo]) (1.15.0)
Collecting numpy
Using cached numpy-1.24.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
Collecting llvmlite<0.41,>=0.40.0dev0
Using cached llvmlite-0.40.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (42.1 MB)
Requirement already satisfied: pytz>=2020.1 in ./venv/lib/python3.10/site-packages (from pandas->sb-arch-opt[arch_sbo]) (2023.3)
Requirement already satisfied: tzdata>=2022.1 in ./venv/lib/python3.10/site-packages (from pandas->sb-arch-opt[arch_sbo]) (2023.3)
Requirement already satisfied: python-dateutil>=2.8.2 in ./venv/lib/python3.10/site-packages (from pandas->sb-arch-opt[arch_sbo]) (2.8.2)
Collecting joblib>=1.1.1
Using cached joblib-1.3.1-py3-none-any.whl (301 kB)
Collecting threadpoolctl>=2.0.0
Using cached threadpoolctl-3.1.0-py3-none-any.whl (14 kB)
Requirement already satisfied: future>=0.15.2 in ./venv/lib/python3.10/site-packages (from autograd>=1.4->pymoo~=0.6.0.1->sb-arch-opt[arch_sbo]) (0.18.3)
Requirement already satisfied: pillow>=6.2.0 in ./venv/lib/python3.10/site-packages (from matplotlib>=3->pymoo~=0.6.0.1->sb-arch-opt[arch_sbo]) (10.0.0)
Requirement already satisfied: contourpy>=1.0.1 in ./venv/lib/python3.10/site-packages (from matplotlib>=3->pymoo~=0.6.0.1->sb-arch-opt[arch_sbo]) (1.1.0)
Requirement already satisfied: fonttools>=4.22.0 in ./venv/lib/python3.10/site-packages (from matplotlib>=3->pymoo~=0.6.0.1->sb-arch-opt[arch_sbo]) (4.40.0)
Requirement already satisfied: cycler>=0.10 in ./venv/lib/python3.10/site-packages (from matplotlib>=3->pymoo~=0.6.0.1->sb-arch-opt[arch_sbo]) (0.11.0)
Requirement already satisfied: kiwisolver>=1.0.1 in ./venv/lib/python3.10/site-packages (from matplotlib>=3->pymoo~=0.6.0.1->sb-arch-opt[arch_sbo]) (1.4.4)
Requirement already satisfied: packaging>=20.0 in ./venv/lib/python3.10/site-packages (from matplotlib>=3->pymoo~=0.6.0.1->sb-arch-opt[arch_sbo]) (23.1)
Requirement already satisfied: six>=1.5 in ./venv/lib/python3.10/site-packages (from python-dateutil>=2.8.2->pandas->sb-arch-opt[arch_sbo]) (1.16.0)
Requirement already satisfied: about-time==4.2.1 in ./venv/lib/python3.10/site-packages (from alive-progress->pymoo~=0.6.0.1->sb-arch-opt[arch_sbo]) (4.2.1)
Requirement already satisfied: grapheme==0.6.0 in ./venv/lib/python3.10/site-packages (from alive-progress->pymoo~=0.6.0.1->sb-arch-opt[arch_sbo]) (0.6.0)
Building wheels for collected packages: smt
Building wheel for smt (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for smt (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [129 lines of output]
/tmp/pip-build-env-bucs6scv/overlay/lib/python3.10/site-packages/setuptools/dist.py:745: SetuptoolsDeprecationWarning: Invalid dash-separated options
!!
********************************************************************************
Usage of dash-separated 'description-file' will not be supported in future
versions. Please use the underscore name 'description_file' instead.
By 2023-Sep-26, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
********************************************************************************
!!
opt = self.warn_dash_deprecation(opt, section)
/tmp/pip-build-env-bucs6scv/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
!!
********************************************************************************
The license_file parameter is deprecated, use license_files instead.
By 2023-Oct-30, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
********************************************************************************
!!
parsed = self.parsers.get(option_name, lambda x: x)(value)
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-310
creating build/lib.linux-x86_64-cpython-310/smt
copying smt/__init__.py -> build/lib.linux-x86_64-cpython-310/smt
creating build/lib.linux-x86_64-cpython-310/smt/surrogate_models
copying smt/surrogate_models/rmtc.py -> build/lib.linux-x86_64-cpython-310/smt/surrogate_models
copying smt/surrogate_models/genn.py -> build/lib.linux-x86_64-cpython-310/smt/surrogate_models
copying smt/surrogate_models/idw.py -> build/lib.linux-x86_64-cpython-310/smt/surrogate_models
copying smt/surrogate_models/ls.py -> build/lib.linux-x86_64-cpython-310/smt/surrogate_models
copying smt/surrogate_models/qp.py -> build/lib.linux-x86_64-cpython-310/smt/surrogate_models
copying smt/surrogate_models/kpls.py -> build/lib.linux-x86_64-cpython-310/smt/surrogate_models
copying smt/surrogate_models/rbf.py -> build/lib.linux-x86_64-cpython-310/smt/surrogate_models
copying smt/surrogate_models/rmts.py -> build/lib.linux-x86_64-cpython-310/smt/surrogate_models
copying smt/surrogate_models/surrogate_model.py -> build/lib.linux-x86_64-cpython-310/smt/surrogate_models
copying smt/surrogate_models/rmtb.py -> build/lib.linux-x86_64-cpython-310/smt/surrogate_models
copying smt/surrogate_models/__init__.py -> build/lib.linux-x86_64-cpython-310/smt/surrogate_models
copying smt/surrogate_models/mgp.py -> build/lib.linux-x86_64-cpython-310/smt/surrogate_models
copying smt/surrogate_models/gekpls.py -> build/lib.linux-x86_64-cpython-310/smt/surrogate_models
copying smt/surrogate_models/krg.py -> build/lib.linux-x86_64-cpython-310/smt/surrogate_models
copying smt/surrogate_models/kplsk.py -> build/lib.linux-x86_64-cpython-310/smt/surrogate_models
copying smt/surrogate_models/krg_based.py -> build/lib.linux-x86_64-cpython-310/smt/surrogate_models
creating build/lib.linux-x86_64-cpython-310/smt/problems
copying smt/problems/tensor_product.py -> build/lib.linux-x86_64-cpython-310/smt/problems
copying smt/problems/ndim_step_function.py -> build/lib.linux-x86_64-cpython-310/smt/problems
copying smt/problems/sphere.py -> build/lib.linux-x86_64-cpython-310/smt/problems
copying smt/problems/ndim_robot_arm.py -> build/lib.linux-x86_64-cpython-310/smt/problems
copying smt/problems/mixed_cantilever_beam.py -> build/lib.linux-x86_64-cpython-310/smt/problems
copying smt/problems/welded_beam.py -> build/lib.linux-x86_64-cpython-310/smt/problems
copying smt/problems/water_flow.py -> build/lib.linux-x86_64-cpython-310/smt/problems
copying smt/problems/torsion_vibration.py -> build/lib.linux-x86_64-cpython-310/smt/problems
copying smt/problems/ndim_rosenbrock.py -> build/lib.linux-x86_64-cpython-310/smt/problems
copying smt/problems/problem.py -> build/lib.linux-x86_64-cpython-310/smt/problems
copying smt/problems/branin.py -> build/lib.linux-x86_64-cpython-310/smt/problems
copying smt/problems/rosenbrock.py -> build/lib.linux-x86_64-cpython-310/smt/problems
copying smt/problems/reduced_problem.py -> build/lib.linux-x86_64-cpython-310/smt/problems
copying smt/problems/water_flow_lfidelity.py -> build/lib.linux-x86_64-cpython-310/smt/problems
copying smt/problems/ndim_cantilever_beam.py -> build/lib.linux-x86_64-cpython-310/smt/problems
copying smt/problems/neural_network.py -> build/lib.linux-x86_64-cpython-310/smt/problems
copying smt/problems/robot_arm.py -> build/lib.linux-x86_64-cpython-310/smt/problems
copying smt/problems/lp_norm.py -> build/lib.linux-x86_64-cpython-310/smt/problems
copying smt/problems/wing_weight.py -> build/lib.linux-x86_64-cpython-310/smt/problems
copying smt/problems/hierarchical_goldstein.py -> build/lib.linux-x86_64-cpython-310/smt/problems
copying smt/problems/__init__.py -> build/lib.linux-x86_64-cpython-310/smt/problems
copying smt/problems/cantilever_beam.py -> build/lib.linux-x86_64-cpython-310/smt/problems
creating build/lib.linux-x86_64-cpython-310/smt/sampling_methods
copying smt/sampling_methods/lhs.py -> build/lib.linux-x86_64-cpython-310/smt/sampling_methods
copying smt/sampling_methods/random.py -> build/lib.linux-x86_64-cpython-310/smt/sampling_methods
copying smt/sampling_methods/full_factorial.py -> build/lib.linux-x86_64-cpython-310/smt/sampling_methods
copying smt/sampling_methods/sampling_method.py -> build/lib.linux-x86_64-cpython-310/smt/sampling_methods
copying smt/sampling_methods/__init__.py -> build/lib.linux-x86_64-cpython-310/smt/sampling_methods
creating build/lib.linux-x86_64-cpython-310/smt/utils
copying smt/utils/options_dictionary.py -> build/lib.linux-x86_64-cpython-310/smt/utils
copying smt/utils/line_search.py -> build/lib.linux-x86_64-cpython-310/smt/utils
copying smt/utils/misc.py -> build/lib.linux-x86_64-cpython-310/smt/utils
copying smt/utils/caching.py -> build/lib.linux-x86_64-cpython-310/smt/utils
copying smt/utils/linear_solvers.py -> build/lib.linux-x86_64-cpython-310/smt/utils
copying smt/utils/printer.py -> build/lib.linux-x86_64-cpython-310/smt/utils
copying smt/utils/silence.py -> build/lib.linux-x86_64-cpython-310/smt/utils
copying smt/utils/design_space.py -> build/lib.linux-x86_64-cpython-310/smt/utils
copying smt/utils/krg_sampling.py -> build/lib.linux-x86_64-cpython-310/smt/utils
copying smt/utils/sm_test_case.py -> build/lib.linux-x86_64-cpython-310/smt/utils
copying smt/utils/checks.py -> build/lib.linux-x86_64-cpython-310/smt/utils
copying smt/utils/kriging.py -> build/lib.linux-x86_64-cpython-310/smt/utils
copying smt/utils/__init__.py -> build/lib.linux-x86_64-cpython-310/smt/utils
creating build/lib.linux-x86_64-cpython-310/smt/utils/neural_net
copying smt/utils/neural_net/loss.py -> build/lib.linux-x86_64-cpython-310/smt/utils/neural_net
copying smt/utils/neural_net/model.py -> build/lib.linux-x86_64-cpython-310/smt/utils/neural_net
copying smt/utils/neural_net/data.py -> build/lib.linux-x86_64-cpython-310/smt/utils/neural_net
copying smt/utils/neural_net/metrics.py -> build/lib.linux-x86_64-cpython-310/smt/utils/neural_net
copying smt/utils/neural_net/activation.py -> build/lib.linux-x86_64-cpython-310/smt/utils/neural_net
copying smt/utils/neural_net/bwd_prop.py -> build/lib.linux-x86_64-cpython-310/smt/utils/neural_net
copying smt/utils/neural_net/fwd_prop.py -> build/lib.linux-x86_64-cpython-310/smt/utils/neural_net
copying smt/utils/neural_net/optimizer.py -> build/lib.linux-x86_64-cpython-310/smt/utils/neural_net
copying smt/utils/neural_net/__init__.py -> build/lib.linux-x86_64-cpython-310/smt/utils/neural_net
creating build/lib.linux-x86_64-cpython-310/smt/applications
copying smt/applications/ego.py -> build/lib.linux-x86_64-cpython-310/smt/applications
copying smt/applications/vfm.py -> build/lib.linux-x86_64-cpython-310/smt/applications
copying smt/applications/mfkplsk.py -> build/lib.linux-x86_64-cpython-310/smt/applications
copying smt/applications/mfkpls.py -> build/lib.linux-x86_64-cpython-310/smt/applications
copying smt/applications/moe.py -> build/lib.linux-x86_64-cpython-310/smt/applications
copying smt/applications/mfk.py -> build/lib.linux-x86_64-cpython-310/smt/applications
copying smt/applications/application.py -> build/lib.linux-x86_64-cpython-310/smt/applications
copying smt/applications/__init__.py -> build/lib.linux-x86_64-cpython-310/smt/applications
copying smt/applications/mixed_integer.py -> build/lib.linux-x86_64-cpython-310/smt/applications
running build_ext
building 'smt.surrogate_models.rbfclib' extension
creating build/temp.linux-x86_64-cpython-310
creating build/temp.linux-x86_64-cpython-310/smt
creating build/temp.linux-x86_64-cpython-310/smt/src
creating build/temp.linux-x86_64-cpython-310/smt/src/rbf
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Ismt/src/rbf -I/tmp/pip-build-env-bucs6scv/overlay/lib/python3.10/site-packages/numpy/core/include -I/home/athul/Documents/sbarchopt/venv/include -I/usr/include/python3.10 -c smt/src/rbf/rbf.cpp -o build/temp.linux-x86_64-cpython-310/smt/src/rbf/rbf.o -std=c++11
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Ismt/src/rbf -I/tmp/pip-build-env-bucs6scv/overlay/lib/python3.10/site-packages/numpy/core/include -I/home/athul/Documents/sbarchopt/venv/include -I/usr/include/python3.10 -c smt/src/rbf/rbfclib.cpp -o build/temp.linux-x86_64-cpython-310/smt/src/rbf/rbfclib.o -std=c++11
smt/src/rbf/rbfclib.cpp:35:10: fatal error: Python.h: No such file or directory
35 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for smt
Failed to build smt
ERROR: Could not build wheels for smt, which is required to install pyproject.toml-based projects
@athulpg007 thanks for catching these issues, I'm in contact with the SMT developers to see if I can fix this. The problem lies in that it tries to compile some files in SMT that are actually not needed by SBArchOpt.
To temporarily circumvent, maybe you can just locally clone and install smt dependencies: https://github.com/SMTorg/smt
Then, pip install -e .
and include the path to the smt files in your Python path. Sorry if this is too much work.
Somehow I don't have these problems in the automated tests in this repository... weird
I cloned smt and tried the suggestion above and ran into the same issue as before:
smt/src/rbf/rbfclib.cpp:35:10: fatal error: Python.h: No such file or directory
35 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
The suggested solution here solved the issue.
This issue has been resolved.
pip install sb-arch-opt[arch_sbo]
failed with the following error. Perhaps this is due to something missing in my local env.