Git Product home page Git Product logo

nlopt-python's Introduction

NLOpt Python

PyPI version Build

This project builds Python wheels for the NLOpt library. NLOpt contains various routines for non-linear optimization.

Versions supported

The project supports Python versions 3.6+ and above for Windows, MacOS, and Linux.

Installation

pip install nlopt

Documentation

For more information on how to use NLOpt, refer to the documentation.

nlopt-python's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nlopt-python's Issues

Can't build nlopt wheels

I am trying to install nlopt from the command line using "pip3 install nlopt" on macOS but am getting the error "ERROR: Failed building wheel for nlopt
ERROR: Could not build wheels for nlopt, which is required to install pyproject.toml-based projects"
I have tried trouble shooting on my own but still can't resolve the issue.

Request: Update pypi tags to be compatible with Python 3.10

It seems that the latest PyPI release of this package is only tagged as compatible with Python versions through 3.9.9. Assuming it's the case, could you please update the tags to indicate compatibility with Python 3.10, and allow tools like poetry to correctly install nlopt for Python 3.10?

Numpy API compatibility breaks 2.7.1

With 2.7.1, there is an error when importing nlopt having a numpy version<1.22 installed.

Steps to reproduce:
install numpy<1.22, install nlopt

I think this is related to pypa/pip#9542

Error message:

RuntimeError: module compiled against API version 0xf but this version of numpy is 0xe
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jonas/anaconda3/envs/tmp38/lib/python3.8/site-packages/nlopt/__init__.py", line 1, in <module>
    from .nlopt import *
  File "/home/jonas/anaconda3/envs/tmp38/lib/python3.8/site-packages/nlopt/nlopt.py", line 20, in <module>
    from . import _nlopt
ImportError: numpy.core.multiarray failed to import

nlopt-2.7.1.dist-info due to invalid metadata entry 'name'

whenever using pip, I get
WARNING: Skipping .../python3.11/site-packages/nlopt-2.7.1.dist-info due to invalid metadata entry 'name'

The METADATA file located at nlopt-2.7.1.dist-info/METADATA is empty.

At a minimum it should have something like:
Metadata-Version: 2.1
Name: nlopt
Version: 2.7.1

Which makes the WARNING stop. Even if you do not have time to redistribute. I hope folks can update the METADATA file on their own system.

Missing SDist for 2.7.1

The SDist is missing on PyPI for 2.7.1, which has made it impossible to update in Pyodide for the 0.20 (Python 3.10!) release. 2.6.2 seems to be the last one with an SDist. pipx run build --sdist should produce one for upload.

Successful installation on Android armv8l via termux

I did pip install nlopt -v following is partial output

[ 94%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/ags/ags.cc.o
  [ 96%] Linking CXX static library libnlopt.a
  [100%] Built target nlopt
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/data/data/com.termux/files/usr/tmp/pip-install-vbohu2l6/nlopt_f25797d0023d4d56b2dd14e0e1bb29ee/setup.py", line 85, in <module>
      setup(
    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/data/data/com.termux/files/usr/lib/python3.9/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/data/data/com.termux/files/usr/lib/python3.9/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/data/data/com.termux/files/usr/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 325, in run
      self.run_command("build")
    File "/data/data/com.termux/files/usr/lib/python3.9/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/data/data/com.termux/files/usr/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/data/data/com.termux/files/usr/lib/python3.9/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/data/data/com.termux/files/usr/lib/python3.9/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/data/data/com.termux/files/usr/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/data/data/com.termux/files/usr/tmp/pip-install-vbohu2l6/nlopt_f25797d0023d4d56b2dd14e0e1bb29ee/setup.py", line 28, in run
      self.build_extension(ext)
    File "/data/data/com.termux/files/usr/tmp/pip-install-vbohu2l6/nlopt_f25797d0023d4d56b2dd14e0e1bb29ee/setup.py", line 70, in build_extension
      nlopt_py = next(Path(self.build_temp).rglob("nlopt.py"))
  StopIteration
  error: subprocess-exited-with-error

  × python setup.py bdist_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.
  full command: /data/data/com.termux/files/usr/bin/python3.9 -u -c '
  exec(compile('"'"''"'"''"'"'
  # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
  #
  # - It imports setuptools before invoking setup.py, to enable projects that directly
  #   import from `distutils.core` to work with newer packaging standards.
  # - It provides a clear error message when setuptools is not installed.
  # - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
  #   setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
  #     manifest_maker: standard file '"'"'-c'"'"' not found".
  # - It generates a shim setup.py, for handling setup.cfg-only projects.
  import os, sys, tokenize

  try:
      import setuptools
  except ImportError as error:
      print(
          "ERROR: Can not execute `setup.py` since setuptools is not available in "
          "the build environment.",
          file=sys.stderr,
      )
      sys.exit(1)

  __file__ = %r
  sys.argv[0] = __file__

  if os.path.exists(__file__):
      filename = __file__
      with tokenize.open(__file__) as f:
          setup_py_code = f.read()
  else:
      filename = "<auto-generated setuptools caller>"
      setup_py_code = "from setuptools import setup; setup()"

  exec(compile(setup_py_code, filename, "exec"))
  '"'"''"'"''"'"' % ('"'"'/data/data/com.termux/files/usr/tmp/pip-install-vbohu2l6/nlopt_f25797d0023d4d56b2dd14e0e1bb29ee/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' bdist_wheel -d /data/data/com.termux/files/usr/tmp/pip-wheel-y_fnr7vl
  cwd: /data/data/com.termux/files/usr/tmp/pip-install-vbohu2l6/nlopt_f25797d0023d4d56b2dd14e0e1bb29ee/
  Building wheel for nlopt (setup.py) ... error
  ERROR: Failed building wheel for nlopt
  Running setup.py clean for nlopt
  Running command python setup.py clean
  running clean
  removing 'build/temp.linux-armv8l-3.9' (and everything under it)
  'build/lib.linux-armv8l-3.9' does not exist -- can't clean it
  'build/bdist.linux-armv8l' does not exist -- can't clean it
  'build/scripts-3.9' does not exist -- can't clean it
  removing 'build'
Failed to build nlopt
ERROR: Could not build wheels for nlopt, which is required to install pyproject.toml-based projects

Failed to install via pip on M1 Mac

Hi,

I was trying to install this on an M1 Macbook and got the following error

error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [295 lines of output]
      running bdist_wheel
      running build
      running build_ext
      cmake version 3.23.0

      CMake suite maintained and supported by Kitware (kitware.com/cmake).
      -- The C compiler identification is AppleClang 13.1.6.13160021
      -- The CXX compiler identification is AppleClang 13.1.6.13160021
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Found PythonInterp: /Applications/Xcode.app/Contents/Developer/usr/bin/python3 (found version "3.8.9")
      -- Found Python includes: /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8
      -- Found Python libs: /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib
      CMake Deprecation Warning at extern/nlopt/CMakeLists.txt:15 (cmake_minimum_required):
        Compatibility with CMake < 2.8.12 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value or use a ...<max> suffix to tell
        CMake that the project does not need compatibility with older versions.


      -- NLopt version 2.6.2
      -- Looking for dlfcn.h
      -- Looking for dlfcn.h - found
      -- Looking for getopt.h
      -- Looking for getopt.h - found
      -- Looking for unistd.h
      -- Looking for unistd.h - found
      -- Looking for string.h
      -- Looking for string.h - found
      -- Looking for strings.h
      -- Looking for strings.h - found
      -- Looking for inttypes.h
      -- Looking for inttypes.h - found
      -- Looking for memory.h
      -- Looking for memory.h - found
      -- Looking for stdlib.h
      -- Looking for stdlib.h - found
      -- Looking for stdint.h
      -- Looking for stdint.h - found
      -- Looking for time.h
      -- Looking for time.h - found
      -- Looking for sys/types.h
      -- Looking for sys/types.h - found
      -- Looking for sys/stat.h
      -- Looking for sys/stat.h - found
      -- Looking for sys/time.h
      -- Looking for sys/time.h - found
      -- Looking for getpid
      -- Looking for getpid - found
      -- Looking for syscall
      -- Looking for syscall - found
      -- Looking for isinf
      -- Looking for isinf - found
      -- Looking for isnan
      -- Looking for isnan - found
      -- Looking for gettimeofday
      -- Looking for gettimeofday - found
      -- Looking for qsort_r
      -- Looking for qsort_r - found
      -- Looking for time
      -- Looking for time - found
      -- Looking for copysign
      -- Looking for copysign - found
      -- Looking for stddef.h
      -- Looking for stddef.h - found
      -- Check size of uint32_t
      -- Check size of uint32_t - done
      -- Check size of unsigned int
      -- Check size of unsigned int - done
      -- Check size of unsigned long
      -- Check size of unsigned long - done
      -- Looking for sqrt in m
      -- Looking for sqrt in m - found
      -- Looking for fpclassify
      -- Looking for fpclassify - TRUE
      -- Performing Test HAVE_THREAD_LOCAL_STORAGE
      -- Performing Test HAVE_THREAD_LOCAL_STORAGE - Success
      -- Performing Test HAVE_THREAD_LOCAL_STORAGE
      -- Performing Test HAVE_THREAD_LOCAL_STORAGE - Failed
      -- Looking for __cplusplus
      -- Looking for __cplusplus - found
      -- Performing Test SUPPORTS_STDCXX11
      -- Performing Test SUPPORTS_STDCXX11 - Success
      -- Performing Test HAS_FPIC
      -- Performing Test HAS_FPIC - Success
      -- Found PythonLibs: /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib (found suitable exact version "3.8.9")
      -- Found NumPy: /Users/bolundai/Library/Python/3.8/lib/python/site-packages/numpy/core/include (found version "1.22.3")
      -- Could NOT find Guile (missing: GUILE_EXECUTABLE GUILE_ROOT_DIR GUILE_INCLUDE_DIRS GUILE_LIBRARIES)
      -- Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR)
      -- Could NOT find Octave (missing: OCTAVE_EXECUTABLE OCTAVE_ROOT_DIR OCTAVE_INCLUDE_DIRS OCTAVE_LIBRARIES)
      -- Found Matlab: /Applications/MATLAB_R2022a.app/extern/include (found version "9.12") found components: MX_LIBRARY MAIN_PROGRAM
      -- Performing Test HAS_MINUS_PTHREAD
      -- Performing Test HAS_MINUS_PTHREAD - Success
      -- Configuring done
      -- Generating done
      -- Build files have been written to: /private/var/folders/rq/md19ny9502q_prjm4sf7n0gr0000gn/T/pip-install-1ti436ln/nlopt_6161bd3a13584516af2ec72a8107a5b8/build/temp.macosx-10.14-arm64-3.8
      [  3%] Generating nlopt.f
      [  3%] Generating nlopt.hpp
      CMake Deprecation Warning at /private/var/folders/rq/md19ny9502q_prjm4sf7n0gr0000gn/T/pip-install-1ti436ln/nlopt_6161bd3a13584516af2ec72a8107a5b8/extern/nlopt/cmake/generate-fortran.cmake:1 (cmake_minimum_required):
        Compatibility with CMake < 2.8.12 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value or use a ...<max> suffix to tell
        CMake that the project does not need compatibility with older versions.

      CMake Deprecation Warning at /private/var/folders/rq/md19ny9502q_prjm4sf7n0gr0000gn/T/pip-install-1ti436ln/nlopt_6161bd3a13584516af2ec72a8107a5b8/extern/nlopt/cmake/generate-cpp.cmake:1 (cmake_minimum_required):
        Compatibility with CMake < 2.8.12 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value or use a ...<max> suffix to tell
        CMake that the project does not need compatibility with older versions.



      [  3%] Built target generate-fortran
      [  3%] Built target generate-cpp
      [  7%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/direct/DIRect.c.o
      [  7%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/direct/direct_wrap.c.o
      [  9%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/direct/DIRserial.c.o
      [ 11%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/direct/DIRsubrout.c.o
      [ 12%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/cdirect/cdirect.c.o
      [ 14%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/cdirect/hybrid.c.o
      [ 16%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/praxis/praxis.c.o
      [ 18%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/luksan/plis.c.o
      [ 20%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/luksan/plip.c.o
      [ 22%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/luksan/pnet.c.o
      [ 24%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/luksan/mssubs.c.o
      [ 25%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/luksan/pssubs.c.o
      [ 27%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/crs/crs.c.o
      [ 29%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/mlsl/mlsl.c.o
      [ 31%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/mma/mma.c.o
      [ 33%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/mma/ccsa_quadratic.c.o
      [ 35%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/cobyla/cobyla.c.o
      [ 37%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/newuoa/newuoa.c.o
      [ 38%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/neldermead/nldrmd.c.o
      [ 40%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/neldermead/sbplx.c.o
      [ 42%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/auglag/auglag.c.o
      [ 44%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/bobyqa/bobyqa.c.o
      [ 46%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/isres/isres.c.o
      [ 48%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/slsqp/slsqp.c.o
      [ 50%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/esch/esch.c.o
      [ 51%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/api/general.c.o
      [ 53%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/api/options.c.o
      [ 55%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/api/optimize.c.o
      [ 57%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/api/deprecated.c.o
      [ 59%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/api/f77api.c.o
      [ 61%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/util/mt19937ar.c.o
      [ 62%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/util/sobolseq.c.o
      [ 64%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/util/timer.c.o
      [ 66%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/util/stop.c.o
      [ 68%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/util/redblack.c.o
      [ 70%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/util/qsort_r.c.o
      [ 72%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/util/rescale.c.o
      [ 74%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/stogo/global.cc.o
      [ 75%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/stogo/linalg.cc.o
      [ 77%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/stogo/local.cc.o
      [ 79%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/stogo/stogo.cc.o
      [ 81%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/stogo/tools.cc.o
      [ 83%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/ags/evolvent.cc.o
      [ 85%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/ags/solver.cc.o
      [ 87%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/ags/local_optimizer.cc.o
      [ 88%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/ags/ags.cc.o
      [ 90%] Linking CXX static library libnlopt.a
      [ 94%] Built target nlopt
      [ 98%] Building C object extern/nlopt/src/octave/CMakeFiles/nlopt_optimize-mex.dir/Applications/MATLAB_R2022a.app/extern/version/c_mexapi_version.c.o
      [ 98%] Building C object extern/nlopt/src/octave/CMakeFiles/nlopt_optimize-mex.dir/nlopt_optimize-mex.c.o
      [100%] Linking CXX shared library ../../../../../lib.macosx-10.14-arm64-3.8/nlopt/nlopt_optimize.mexmaci64
      ld: warning: ignoring file /Applications/MATLAB_R2022a.app/extern/bin/maci64/libMatlabEngine.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
      ld: warning: ignoring file /Applications/MATLAB_R2022a.app/bin/maci64/libMatlabDataArray.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
      ld: warning: ignoring file /Applications/MATLAB_R2022a.app/bin/maci64/libmx.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
      ld: warning: ignoring file /Applications/MATLAB_R2022a.app/bin/maci64/libmex.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
      Undefined symbols for architecture arm64:
        "_mexCallMATLABWithObject", referenced from:
            _user_function in nlopt_optimize-mex.c.o
            _user_pre in nlopt_optimize-mex.c.o
        "_mexErrMsgTxt", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
            _mexFunction in nlopt_optimize-mex.c.o
            _user_function in nlopt_optimize-mex.c.o
            _user_pre in nlopt_optimize-mex.c.o
        "_mexPrintf", referenced from:
            _user_function in nlopt_optimize-mex.c.o
            _user_pre in nlopt_optimize-mex.c.o
        "_mexWarnMsgTxt", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
        "_mxCalloc", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
            _mexFunction in nlopt_optimize-mex.c.o
        "_mxCreateDoubleMatrix_730", referenced from:
            _mexFunction in nlopt_optimize-mex.c.o
        "_mxDestroyArray", referenced from:
            _mexFunction in nlopt_optimize-mex.c.o
            _user_function in nlopt_optimize-mex.c.o
            _user_pre in nlopt_optimize-mex.c.o
        "_mxFree", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
            _mexFunction in nlopt_optimize-mex.c.o
        "_mxGetCell_730", referenced from:
            _mexFunction in nlopt_optimize-mex.c.o
        "_mxGetField_730", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
            _mexFunction in nlopt_optimize-mex.c.o
        "_mxGetM", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
            _mexFunction in nlopt_optimize-mex.c.o
            _user_function in nlopt_optimize-mex.c.o
            _user_pre in nlopt_optimize-mex.c.o
        "_mxGetN", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
            _mexFunction in nlopt_optimize-mex.c.o
            _user_function in nlopt_optimize-mex.c.o
            _user_pre in nlopt_optimize-mex.c.o
        "_mxGetPr", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
            _mexFunction in nlopt_optimize-mex.c.o
            _user_function in nlopt_optimize-mex.c.o
            _user_pre in nlopt_optimize-mex.c.o
        "_mxGetScalar", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
            _mexFunction in nlopt_optimize-mex.c.o
            _user_function in nlopt_optimize-mex.c.o
        "_mxGetString_730", referenced from:
            _mexFunction in nlopt_optimize-mex.c.o
        "_mxIsCell", referenced from:
            _mexFunction in nlopt_optimize-mex.c.o
        "_mxIsChar", referenced from:
            _mexFunction in nlopt_optimize-mex.c.o
        "_mxIsComplex", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
            _mexFunction in nlopt_optimize-mex.c.o
            _user_function in nlopt_optimize-mex.c.o
            _user_pre in nlopt_optimize-mex.c.o
        "_mxIsDouble", referenced from:
            _mexFunction in nlopt_optimize-mex.c.o
            _user_function in nlopt_optimize-mex.c.o
            _user_pre in nlopt_optimize-mex.c.o
        "_mxIsFunctionHandle", referenced from:
            _mexFunction in nlopt_optimize-mex.c.o
        "_mxIsNaN", referenced from:
            _user_function in nlopt_optimize-mex.c.o
        "_mxIsNumeric", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
            _mexFunction in nlopt_optimize-mex.c.o
            _user_function in nlopt_optimize-mex.c.o
        "_mxIsStruct", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
            _mexFunction in nlopt_optimize-mex.c.o
      ld: symbol(s) not found for architecture arm64
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      make[2]: *** [../lib.macosx-10.14-arm64-3.8/nlopt/nlopt_optimize.mexmaci64] Error 1
      make[1]: *** [extern/nlopt/src/octave/CMakeFiles/nlopt_optimize-mex.dir/all] Error 2
      make: *** [all] Error 2
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/rq/md19ny9502q_prjm4sf7n0gr0000gn/T/pip-install-1ti436ln/nlopt_6161bd3a13584516af2ec72a8107a5b8/setup.py", line 85, in <module>
          setup(
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 165, in setup
          return distutils.core.setup(**attrs)
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
          dist.run_commands()
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
          self.run_command(cmd)
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 299, in run
          self.run_command('build')
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/build.py", line 135, in run
          self.run_command(cmd_name)
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/private/var/folders/rq/md19ny9502q_prjm4sf7n0gr0000gn/T/pip-install-1ti436ln/nlopt_6161bd3a13584516af2ec72a8107a5b8/setup.py", line 28, in run
          self.build_extension(ext)
        File "/private/var/folders/rq/md19ny9502q_prjm4sf7n0gr0000gn/T/pip-install-1ti436ln/nlopt_6161bd3a13584516af2ec72a8107a5b8/setup.py", line 68, in build_extension
          cmd("cmake", "--build", ".", *build_args, cwd=self.build_temp)
        File "/private/var/folders/rq/md19ny9502q_prjm4sf7n0gr0000gn/T/pip-install-1ti436ln/nlopt_6161bd3a13584516af2ec72a8107a5b8/setup.py", line 65, in cmd
          subp.check_call([str(x) for x in args], **kwds)
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 364, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for nlopt
  error: subprocess-exited-with-error

  × Running setup.py install for nlopt did not run successfully.
  │ exit code: 1
  ╰─> [297 lines of output]
      running install
      running build
      running build_ext
      cmake version 3.23.0

      CMake suite maintained and supported by Kitware (kitware.com/cmake).
      -- The C compiler identification is AppleClang 13.1.6.13160021
      -- The CXX compiler identification is AppleClang 13.1.6.13160021
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Found PythonInterp: /Applications/Xcode.app/Contents/Developer/usr/bin/python3 (found version "3.8.9")
      -- Found Python includes: /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8
      -- Found Python libs: /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib
      CMake Deprecation Warning at extern/nlopt/CMakeLists.txt:15 (cmake_minimum_required):
        Compatibility with CMake < 2.8.12 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value or use a ...<max> suffix to tell
        CMake that the project does not need compatibility with older versions.


      -- NLopt version 2.6.2
      -- Looking for dlfcn.h
      -- Looking for dlfcn.h - found
      -- Looking for getopt.h
      -- Looking for getopt.h - found
      -- Looking for unistd.h
      -- Looking for unistd.h - found
      -- Looking for string.h
      -- Looking for string.h - found
      -- Looking for strings.h
      -- Looking for strings.h - found
      -- Looking for inttypes.h
      -- Looking for inttypes.h - found
      -- Looking for memory.h
      -- Looking for memory.h - found
      -- Looking for stdlib.h
      -- Looking for stdlib.h - found
      -- Looking for stdint.h
      -- Looking for stdint.h - found
      -- Looking for time.h
      -- Looking for time.h - found
      -- Looking for sys/types.h
      -- Looking for sys/types.h - found
      -- Looking for sys/stat.h
      -- Looking for sys/stat.h - found
      -- Looking for sys/time.h
      -- Looking for sys/time.h - found
      -- Looking for getpid
      -- Looking for getpid - found
      -- Looking for syscall
      -- Looking for syscall - found
      -- Looking for isinf
      -- Looking for isinf - found
      -- Looking for isnan
      -- Looking for isnan - found
      -- Looking for gettimeofday
      -- Looking for gettimeofday - found
      -- Looking for qsort_r
      -- Looking for qsort_r - found
      -- Looking for time
      -- Looking for time - found
      -- Looking for copysign
      -- Looking for copysign - found
      -- Looking for stddef.h
      -- Looking for stddef.h - found
      -- Check size of uint32_t
      -- Check size of uint32_t - done
      -- Check size of unsigned int
      -- Check size of unsigned int - done
      -- Check size of unsigned long
      -- Check size of unsigned long - done
      -- Looking for sqrt in m
      -- Looking for sqrt in m - found
      -- Looking for fpclassify
      -- Looking for fpclassify - TRUE
      -- Performing Test HAVE_THREAD_LOCAL_STORAGE
      -- Performing Test HAVE_THREAD_LOCAL_STORAGE - Success
      -- Performing Test HAVE_THREAD_LOCAL_STORAGE
      -- Performing Test HAVE_THREAD_LOCAL_STORAGE - Failed
      -- Looking for __cplusplus
      -- Looking for __cplusplus - found
      -- Performing Test SUPPORTS_STDCXX11
      -- Performing Test SUPPORTS_STDCXX11 - Success
      -- Performing Test HAS_FPIC
      -- Performing Test HAS_FPIC - Success
      -- Found PythonLibs: /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib (found suitable exact version "3.8.9")
      -- Found NumPy: /Users/bolundai/Library/Python/3.8/lib/python/site-packages/numpy/core/include (found version "1.22.3")
      -- Could NOT find Guile (missing: GUILE_EXECUTABLE GUILE_ROOT_DIR GUILE_INCLUDE_DIRS GUILE_LIBRARIES)
      -- Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR)
      -- Could NOT find Octave (missing: OCTAVE_EXECUTABLE OCTAVE_ROOT_DIR OCTAVE_INCLUDE_DIRS OCTAVE_LIBRARIES)
      -- Found Matlab: /Applications/MATLAB_R2022a.app/extern/include (found version "9.12") found components: MX_LIBRARY MAIN_PROGRAM
      -- Performing Test HAS_MINUS_PTHREAD
      -- Performing Test HAS_MINUS_PTHREAD - Success
      -- Configuring done
      -- Generating done
      -- Build files have been written to: /private/var/folders/rq/md19ny9502q_prjm4sf7n0gr0000gn/T/pip-install-1ti436ln/nlopt_6161bd3a13584516af2ec72a8107a5b8/build/temp.macosx-10.14-arm64-3.8
      [  3%] Generating nlopt.f
      [  3%] Generating nlopt.hpp
      CMake Deprecation Warning at /private/var/folders/rq/md19ny9502q_prjm4sf7n0gr0000gn/T/pip-install-1ti436ln/nlopt_6161bd3a13584516af2ec72a8107a5b8/extern/nlopt/cmake/generate-fortran.cmake:1 (cmake_minimum_required):
        Compatibility with CMake < 2.8.12 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value or use a ...<max> suffix to tell
        CMake that the project does not need compatibility with older versions.


      CMake Deprecation Warning at /private/var/folders/rq/md19ny9502q_prjm4sf7n0gr0000gn/T/pip-install-1ti436ln/nlopt_6161bd3a13584516af2ec72a8107a5b8/extern/nlopt/cmake/generate-cpp.cmake:1 (cmake_minimum_required):
        Compatibility with CMake < 2.8.12 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value or use a ...<max> suffix to tell
        CMake that the project does not need compatibility with older versions.


      [  3%] Built target generate-fortran
      [  3%] Built target generate-cpp
      [  7%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/direct/DIRect.c.o
      [  7%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/direct/direct_wrap.c.o
      [  9%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/direct/DIRserial.c.o
      [ 11%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/direct/DIRsubrout.c.o
      [ 12%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/cdirect/cdirect.c.o
      [ 14%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/cdirect/hybrid.c.o
      [ 16%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/praxis/praxis.c.o
      [ 18%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/luksan/plis.c.o
      [ 20%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/luksan/plip.c.o
      [ 22%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/luksan/pnet.c.o
      [ 24%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/luksan/mssubs.c.o
      [ 25%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/luksan/pssubs.c.o
      [ 27%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/crs/crs.c.o
      [ 29%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/mlsl/mlsl.c.o
      [ 31%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/mma/mma.c.o
      [ 33%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/mma/ccsa_quadratic.c.o
      [ 35%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/cobyla/cobyla.c.o
      [ 37%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/newuoa/newuoa.c.o
      [ 38%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/neldermead/nldrmd.c.o
      [ 40%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/neldermead/sbplx.c.o
      [ 42%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/auglag/auglag.c.o
      [ 44%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/bobyqa/bobyqa.c.o
      [ 46%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/isres/isres.c.o
      [ 48%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/slsqp/slsqp.c.o
      [ 50%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/esch/esch.c.o
      [ 51%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/api/general.c.o
      [ 53%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/api/options.c.o
      [ 55%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/api/optimize.c.o
      [ 57%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/api/deprecated.c.o
      [ 59%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/api/f77api.c.o
      [ 61%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/util/mt19937ar.c.o
      [ 62%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/util/sobolseq.c.o
      [ 64%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/util/timer.c.o
      [ 66%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/util/stop.c.o
      [ 68%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/util/redblack.c.o
      [ 70%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/util/qsort_r.c.o
      [ 72%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/util/rescale.c.o
      [ 74%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/stogo/global.cc.o
      [ 75%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/stogo/linalg.cc.o
      [ 77%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/stogo/local.cc.o
      [ 79%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/stogo/stogo.cc.o
      [ 81%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/stogo/tools.cc.o
      [ 83%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/ags/evolvent.cc.o
      [ 85%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/ags/solver.cc.o
      [ 87%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/ags/local_optimizer.cc.o
      [ 88%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/ags/ags.cc.o
      [ 90%] Linking CXX static library libnlopt.a
      [ 94%] Built target nlopt
      [ 98%] Building C object extern/nlopt/src/octave/CMakeFiles/nlopt_optimize-mex.dir/Applications/MATLAB_R2022a.app/extern/version/c_mexapi_version.c.o
      [ 98%] Building C object extern/nlopt/src/octave/CMakeFiles/nlopt_optimize-mex.dir/nlopt_optimize-mex.c.o
      [100%] Linking CXX shared library ../../../../../lib.macosx-10.14-arm64-3.8/nlopt/nlopt_optimize.mexmaci64
      ld: warning: ignoring file /Applications/MATLAB_R2022a.app/extern/bin/maci64/libMatlabEngine.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
      ld: warning: ignoring file /Applications/MATLAB_R2022a.app/bin/maci64/libMatlabDataArray.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
      ld: warning: ignoring file /Applications/MATLAB_R2022a.app/bin/maci64/libmex.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
      ld: warning: ignoring file /Applications/MATLAB_R2022a.app/bin/maci64/libmx.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
      Undefined symbols for architecture arm64:
        "_mexCallMATLABWithObject", referenced from:
            _user_function in nlopt_optimize-mex.c.o
            _user_pre in nlopt_optimize-mex.c.o
        "_mexErrMsgTxt", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
            _mexFunction in nlopt_optimize-mex.c.o
            _user_function in nlopt_optimize-mex.c.o
            _user_pre in nlopt_optimize-mex.c.o
        "_mexPrintf", referenced from:
            _user_function in nlopt_optimize-mex.c.o
            _user_pre in nlopt_optimize-mex.c.o
        "_mexWarnMsgTxt", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
        "_mxCalloc", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
            _mexFunction in nlopt_optimize-mex.c.o
        "_mxCreateDoubleMatrix_730", referenced from:
            _mexFunction in nlopt_optimize-mex.c.o
        "_mxDestroyArray", referenced from:
            _mexFunction in nlopt_optimize-mex.c.o
            _user_function in nlopt_optimize-mex.c.o
            _user_pre in nlopt_optimize-mex.c.o
        "_mxFree", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
            _mexFunction in nlopt_optimize-mex.c.o
        "_mxGetCell_730", referenced from:
            _mexFunction in nlopt_optimize-mex.c.o
        "_mxGetField_730", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
            _mexFunction in nlopt_optimize-mex.c.o
        "_mxGetM", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
            _mexFunction in nlopt_optimize-mex.c.o
            _user_function in nlopt_optimize-mex.c.o
            _user_pre in nlopt_optimize-mex.c.o
        "_mxGetN", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
            _mexFunction in nlopt_optimize-mex.c.o
            _user_function in nlopt_optimize-mex.c.o
            _user_pre in nlopt_optimize-mex.c.o
        "_mxGetPr", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
            _mexFunction in nlopt_optimize-mex.c.o
            _user_function in nlopt_optimize-mex.c.o
            _user_pre in nlopt_optimize-mex.c.o
        "_mxGetScalar", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
            _mexFunction in nlopt_optimize-mex.c.o
            _user_function in nlopt_optimize-mex.c.o
        "_mxGetString_730", referenced from:
            _mexFunction in nlopt_optimize-mex.c.o
        "_mxIsCell", referenced from:
            _mexFunction in nlopt_optimize-mex.c.o
        "_mxIsChar", referenced from:
            _mexFunction in nlopt_optimize-mex.c.o
        "_mxIsComplex", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
            _mexFunction in nlopt_optimize-mex.c.o
            _user_function in nlopt_optimize-mex.c.o
            _user_pre in nlopt_optimize-mex.c.o
        "_mxIsDouble", referenced from:
            _mexFunction in nlopt_optimize-mex.c.o
            _user_function in nlopt_optimize-mex.c.o
            _user_pre in nlopt_optimize-mex.c.o
        "_mxIsFunctionHandle", referenced from:
            _mexFunction in nlopt_optimize-mex.c.o
        "_mxIsNaN", referenced from:
            _user_function in nlopt_optimize-mex.c.o
        "_mxIsNumeric", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
            _mexFunction in nlopt_optimize-mex.c.o
            _user_function in nlopt_optimize-mex.c.o
        "_mxIsStruct", referenced from:
            _make_opt in nlopt_optimize-mex.c.o
            _mexFunction in nlopt_optimize-mex.c.o
      ld: symbol(s) not found for architecture arm64
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      make[2]: *** [../lib.macosx-10.14-arm64-3.8/nlopt/nlopt_optimize.mexmaci64] Error 1
      make[1]: *** [extern/nlopt/src/octave/CMakeFiles/nlopt_optimize-mex.dir/all] Error 2
      make: *** [all] Error 2
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/rq/md19ny9502q_prjm4sf7n0gr0000gn/T/pip-install-1ti436ln/nlopt_6161bd3a13584516af2ec72a8107a5b8/setup.py", line 85, in <module>
          setup(
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 165, in setup
          return distutils.core.setup(**attrs)
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
          dist.run_commands()
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
          self.run_command(cmd)
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run
          return orig.install.run(self)
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/install.py", line 561, in run
          self.run_command('build')
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/build.py", line 135, in run
          self.run_command(cmd_name)
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/private/var/folders/rq/md19ny9502q_prjm4sf7n0gr0000gn/T/pip-install-1ti436ln/nlopt_6161bd3a13584516af2ec72a8107a5b8/setup.py", line 28, in run
          self.build_extension(ext)
        File "/private/var/folders/rq/md19ny9502q_prjm4sf7n0gr0000gn/T/pip-install-1ti436ln/nlopt_6161bd3a13584516af2ec72a8107a5b8/setup.py", line 68, in build_extension
          cmd("cmake", "--build", ".", *build_args, cwd=self.build_temp)
        File "/private/var/folders/rq/md19ny9502q_prjm4sf7n0gr0000gn/T/pip-install-1ti436ln/nlopt_6161bd3a13584516af2ec72a8107a5b8/setup.py", line 65, in cmd
          subp.check_call([str(x) for x in args], **kwds)
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 364, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> nlopt

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Is this an issue with the M1 mac or something else. Is it possible to help me take a look at this?

Thanks in advance!

Support for Mac OSX

Hey, would be great to see Mac OSX support for this. I tried running build.sh on my machine and got to this stage:

Install the project...
-- Install configuration: "Release"
-- Installing: /stevengj/nlopt/install/lib/pkgconfig/nlopt.pc
-- Installing: /stevengj/nlopt/install/include/nlopt.h
-- Installing: /stevengj/nlopt/install/include/nlopt.hpp
-- Installing: /stevengj/nlopt/install/include/nlopt.f
-- Installing: /stevengj/nlopt/install/lib/libnlopt.0.10.0.dylib
-- Installing: /stevengj/nlopt/install/lib/libnlopt.0.dylib
-- Installing: /stevengj/nlopt/install/lib/libnlopt.dylib
-- Installing: /stevengj/nlopt/install/lib/cmake/nlopt/NLoptLibraryDepends.cmake
-- Installing: /stevengj/nlopt/install/lib/cmake/nlopt/NLoptLibraryDepends-release.cmake
-- Installing: /stevengj/nlopt/install/lib/cmake/nlopt/NLoptConfig.cmake
-- Installing: /stevengj/nlopt/install/lib/cmake/nlopt/NLoptConfigVersion.cmake
-- Installing: /stevengj/nlopt/install/share/man/man3/nlopt.3
-- Installing: /stevengj/nlopt/install/share/man/man3/nlopt_minimize.3
-- Installing: /stevengj/nlopt/install/share/man/man3/nlopt_minimize_constrained.3
cp: directory /app/nlopt does not exist
build.sh: line 49: /opt/python/cp37-cp37m/bin/pip: No such file or directory
build.sh: line 53: auditwheel: command not found

Fair enough, that may not be the intended way of generating the wheels but as there are no Mac wheels built on pypi, I suspect it's not officially supported yet.

'--record {plist}' doesn't record correct plist

The Python feature '--record {plist}' is expected to record the correct plist into a file, but for nlopt-python there are mismatches between actually installed and recorded plist:

===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: %%PYTHON_SITELIBDIR%%/nlopt/__init__.py
Error: Orphaned: %%PYTHON_SITELIBDIR%%/nlopt/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
Error: Orphaned: %%PYTHON_SITELIBDIR%%/nlopt/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.pyc
Error: Orphaned: %%PYTHON_SITELIBDIR%%/nlopt/__pycache__/nlopt%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
Error: Orphaned: %%PYTHON_SITELIBDIR%%/nlopt/__pycache__/nlopt%%PYTHON_EXT_SUFFIX%%.pyc
Error: Orphaned: %%PYTHON_SITELIBDIR%%/nlopt/_nlopt.so
Error: Orphaned: %%PYTHON_SITELIBDIR%%/nlopt/nlopt.py
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: %%PYTHON_SITELIBDIR%%/nlopt/_nlopt%%PYTHON_EXT_SUFFIX%%.so
===> Error: Plist issues found.

Version: 2.7.1
FreeBSD 13.1

release for python 3.12

Hi,

Is there any release for python 3.12?
It would be awesome to get that one.

Please take me in touch if you're planning to create one.

Thanks,

Package for python 2.7

Hello Daniel,

nlopt v2.6.1 has a anaconda package for python 2.7 (which works OK for our applications) but there is no such package in PyPI.
This makes our deployment process a bit tricky because for our applications we target python 2.7 and 3.6+ under both pip and anaconda environments.

Would it be possible for you to create a PyPI package of nlopt v.2.6.1 for pyhon 2.7?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.