jtiosue/qubovert

qubovert doesn't install with python 3.10 on macOS 13.2.1

knsmith opened this issue · 5 comments

$ python3.10 -m venv qubovert-venv
$ source qubovert-venv/bin/activate
(qubovert-venv)$ python3.10 -c "import platform; print(platform.mac_ver())"
('13.2.1', ('', '', ''), 'x86_64')
(qubovert-venv)$ python3.10 -m pip install qubovert
Here is the generated output: Collecting qubovert Using cached qubovert-1.2.5.tar.gz (97 kB) Preparing metadata (setup.py) ... done Collecting numpy Using cached numpy-1.24.2-cp310-cp310-macosx_10_9_x86_64.whl (19.8 MB) Installing collected packages: numpy, qubovert WARNING: The scripts f2py, f2py3 and f2py3.10 are installed in '/Library/Frameworks/Python.framework/Versions/3.10/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. DEPRECATION: qubovert is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559 Running setup.py install for qubovert ... error error: subprocess-exited-with-error

× Running setup.py install for qubovert did not run successfully.
│ exit code: 1
╰─> [235 lines of output]
running install
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-cpython-310
creating build/lib.macosx-10.9-universal2-cpython-310/qubovert
copying qubovert/_pcso.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert
copying qubovert/_pcbo.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert
copying qubovert/_version.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert
copying qubovert/init.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert
copying qubovert/_qubo.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert
copying qubovert/_quso.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert
copying qubovert/_pubo.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert
copying qubovert/main.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert
copying qubovert/_puso.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert
creating build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems
copying qubovert/problems/init.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems
copying qubovert/problems/_problem_parentclass.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems
copying qubovert/problems/main.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems
creating build/lib.macosx-10.9-universal2-cpython-310/qubovert/utils
copying qubovert/utils/_normalize.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/utils
copying qubovert/utils/_qubomatrix.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/utils
copying qubovert/utils/_pusomatrix.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/utils
copying qubovert/utils/_ordering_key.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/utils
copying qubovert/utils/_info.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/utils
copying qubovert/utils/_approximate_extrema.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/utils
copying qubovert/utils/_conversions.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/utils
copying qubovert/utils/init.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/utils
copying qubovert/utils/_warn.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/utils
copying qubovert/utils/_qusomatrix.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/utils
copying qubovert/utils/_pubomatrix.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/utils
copying qubovert/utils/_solve_bruteforce.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/utils
copying qubovert/utils/_binary_helpers.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/utils
copying qubovert/utils/_values.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/utils
copying qubovert/utils/_subgraph.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/utils
copying qubovert/utils/main.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/utils
copying qubovert/utils/_dict_arithmetic.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/utils
copying qubovert/utils/_bo_parentclass.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/utils
creating build/lib.macosx-10.9-universal2-cpython-310/qubovert/sat
copying qubovert/sat/init.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/sat
copying qubovert/sat/_satisfiability.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/sat
copying qubovert/sat/main.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/sat
creating build/lib.macosx-10.9-universal2-cpython-310/qubovert/sim
copying qubovert/sim/_anneal_temperature_range.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/sim
copying qubovert/sim/_anneal.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/sim
copying qubovert/sim/init.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/sim
copying qubovert/sim/_anneal_results.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/sim
copying qubovert/sim/main.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/sim
creating build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np
copying qubovert/problems/np/init.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np
copying qubovert/problems/np/main.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np
creating build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/benchmarking
copying qubovert/problems/benchmarking/init.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/benchmarking
copying qubovert/problems/benchmarking/_alternating_sectors_chain.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/benchmarking
copying qubovert/problems/benchmarking/main.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/benchmarking
creating build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/cycles
copying qubovert/problems/np/cycles/init.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/cycles
copying qubovert/problems/np/cycles/main.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/cycles
creating build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/tree
copying qubovert/problems/np/tree/init.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/tree
copying qubovert/problems/np/tree/main.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/tree
creating build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/bilp
copying qubovert/problems/np/bilp/init.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/bilp
copying qubovert/problems/np/bilp/main.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/bilp
copying qubovert/problems/np/bilp/_bilp.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/bilp
creating build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/coloring
copying qubovert/problems/np/coloring/_job_sequencing.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/coloring
copying qubovert/problems/np/coloring/init.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/coloring
copying qubovert/problems/np/coloring/main.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/coloring
creating build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/partitioning
copying qubovert/problems/np/partitioning/_graph_partitioning.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/partitioning
copying qubovert/problems/np/partitioning/init.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/partitioning
copying qubovert/problems/np/partitioning/_number_partitioning.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/partitioning
copying qubovert/problems/np/partitioning/main.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/partitioning
creating build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/covering
copying qubovert/problems/np/covering/_set_cover.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/covering
copying qubovert/problems/np/covering/_vertex_cover.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/covering
copying qubovert/problems/np/covering/init.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/covering
copying qubovert/problems/np/covering/main.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/covering
creating build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/packing
copying qubovert/problems/np/packing/init.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/packing
copying qubovert/problems/np/packing/main.py -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/problems/np/packing
running egg_info
writing qubovert.egg-info/PKG-INFO
writing dependency_links to qubovert.egg-info/dependency_links.txt
writing requirements to qubovert.egg-info/requires.txt
writing top-level names to qubovert.egg-info/top_level.txt
reading manifest file 'qubovert.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'qubovert.egg-info/SOURCES.txt'
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning: Installing 'qubovert.sim.src' as data is deprecated, please list it in packages.
!!

      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'qubovert.sim.src' as an importable package,
      but it is not listed in the `packages` configuration of setuptools.
  
      'qubovert.sim.src' has been automatically added to the distribution only
      because it may contain data files, but this behavior is likely to change
      in future versions of setuptools (and therefore is considered deprecated).
  
      Please make sure that 'qubovert.sim.src' is included as a package by using
      the `packages` configuration field or the proper discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).
  
      You can read more about "package discovery" and "data files" on setuptools
      documentation page.
  
  
  !!
  
    check.warn(importable)
  copying qubovert/sim/_canneal.c -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/sim
  creating build/lib.macosx-10.9-universal2-cpython-310/qubovert/sim/src
  copying qubovert/sim/src/anneal_puso.c -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/sim/src
  copying qubovert/sim/src/anneal_puso.h -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/sim/src
  copying qubovert/sim/src/anneal_quso.c -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/sim/src
  copying qubovert/sim/src/anneal_quso.h -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/sim/src
  copying qubovert/sim/src/pcg_basic.c -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/sim/src
  copying qubovert/sim/src/pcg_basic.h -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/sim/src
  copying qubovert/sim/src/random.c -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/sim/src
  copying qubovert/sim/src/random.h -> build/lib.macosx-10.9-universal2-cpython-310/qubovert/sim/src
  running build_ext
  building 'qubovert.sim._canneal' extension
  creating build/temp.macosx-10.9-universal2-cpython-310
  creating build/temp.macosx-10.9-universal2-cpython-310/qubovert
  creating build/temp.macosx-10.9-universal2-cpython-310/qubovert/sim
  creating build/temp.macosx-10.9-universal2-cpython-310/qubovert/sim/src
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I./qubovert/sim/src/ -I/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c ./qubovert/sim/_canneal.c -o build/temp.macosx-10.9-universal2-cpython-310/./qubovert/sim/_canneal.o
  In file included from ./qubovert/sim/_canneal.c:1:
  In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:11:
  In file included from /Library/Developer/CommandLineTools/usr/lib/clang/11.0.3/include/limits.h:21:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/limits.h:63:
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture
  #error Unsupported architecture
   ^
  In file included from ./qubovert/sim/_canneal.c:1:
  In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:11:
  In file included from /Library/Developer/CommandLineTools/usr/lib/clang/11.0.3/include/limits.h:21:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/limits.h:64:
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/limits.h:8:2: error: architecture not supported
  #error architecture not supported
   ^
  In file included from ./qubovert/sim/_canneal.c:1:
  In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:25:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:64:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:71:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:27:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:33:
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
  #error architecture not supported
   ^
  In file included from ./qubovert/sim/_canneal.c:1:
  In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:25:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:64:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:71:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:27:
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'
  typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
          ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
  typedef __int32_t       __darwin_blksize_t;     /* preferred block size */
          ^
  note: '__int128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
  typedef __int32_t       __darwin_dev_t;         /* dev_t */
          ^
  note: '__int128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_gid_t;         /* [???] process and group IDs */
          ^
  note: '__uint128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_id_t;          /* [XSI] pid_t, uid_t, or gid_t*/
          ^
  note: '__uint128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'
  typedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bit inodes */
          ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
  typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
          ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'; did you mean '__uint128_t'?
  typedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */
          ^
  note: '__uint128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'
  typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
          ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
  typedef __int32_t       __darwin_pid_t;         /* [???] process and group IDs */
          ^
  note: '__int128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_sigset_t;      /* [???] signal set */
          ^
  note: '__uint128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
  typedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */
          ^
  note: '__int128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */
          ^
  note: '__uint128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
          ^
  note: '__uint128_t' declared here
  In file included from ./qubovert/sim/_canneal.c:1:
  In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:25:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:64:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:71:
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_wctype_t;
          ^
  note: '__uint128_t' declared here
  In file included from ./qubovert/sim/_canneal.c:1:
  In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:25:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:64:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:75:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h:31:
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h:37:2: error: architecture not supported
  #error architecture not supported
   ^
  fatal error: too many errors emitted, stopping now [-ferror-limit=]
  20 errors generated.
  error: command '/usr/bin/clang' failed with exit code 1
  [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.
╰─> qubovert

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

Thanks for opening this issue! It appears to be an issue with old dependencies and a deprecated installation procedure. I've created a new branch for this issue and will work on it soon.

Awesome! Thanks so much!

Hey @jtiosue, is there anything i can do to help with this?

The solution was found here:

export ARCHFLAGS="-arch x86_64"

and

CC=clang CXX=clang++

before installing. Thanks, @vtomole !

Thanks for your help! I will soon convert from setup.py to pyproject.toml, but I think that is unrelated to this issue.