pybind / python_example Goto Github PK
View Code? Open in Web Editor NEWExample pybind11 module built with a Python-based build system
License: Other
Example pybind11 module built with a Python-based build system
License: Other
I am working with the latest version of scipy on Linux Mint, and I am trying to install from source because I want to contribute to the scipy project, as I feel that there is an improvement that I can make to the zvode integrator class. However, when I attempt to install from source, I get the following error:
sudo python3.7 setup.py install
Note: if you need reliable uninstall behavior, then install
with pip instead of using setup.py install
:
pip install .
(from a git repo or downloaded sourcepip install scipy
(last SciPy release on PyPI)Cythonizing sources
Running scipy/special/_generate_pyx.py
Running scipy/linalg/_generate_pyx.py
scipy/linalg/_generate_pyx.py: all files up-to-date
scipy/special/_generate_pyx.py: all files up-to-date
scipy/spatial/ckdtree.pyx has not changed
scipy/fftpack/convolve.pyx has not changed
scipy/stats/_stats.pyx has not changed
scipy/special/cython_special.pyx has not changed
scipy/special/_ufuncs.pyx has not changed
scipy/spatial/_hausdorff.pyx has not changed
scipy/special/_comb.pyx has not changed
scipy/special/_test_round.pyx has not changed
scipy/special/_ellip_harm_2.pyx has not changed
scipy/io/matlab/mio5_utils.pyx has not changed
scipy/io/matlab/streams.pyx has not changed
scipy/io/matlab/mio_utils.pyx has not changed
scipy/interpolate/_bspl.pyx has not changed
scipy/interpolate/_ppoly.pyx has not changed
scipy/special/_ufuncs_cxx.pyx has not changed
scipy/sparse/_csparsetools.pyx.in has not changed
scipy/spatial/_voronoi.pyx has not changed
scipy/sparse/csgraph/_min_spanning_tree.pyx has not changed
scipy/spatial/qhull.pyx has not changed
scipy/sparse/csgraph/_matching.pyx has not changed
scipy/interpolate/interpnd.pyx has not changed
scipy/sparse/csgraph/_reordering.pyx has not changed
scipy/sparse/csgraph/_flow.pyx has not changed
scipy/signal/_max_len_seq_inner.pyx has not changed
scipy/signal/_sosfilt.pyx has not changed
scipy/signal/_spectral.pyx has not changed
scipy/signal/_upfirdn_apply.pyx has not changed
scipy/signal/_peak_finding_utils.pyx has not changed
scipy/optimize/_group_columns.pyx has not changed
scipy/optimize/_bglu_dense.pyx has not changed
scipy/optimize/cython_optimize/_zeros.pyx.in has not changed
scipy/optimize/_trlib/_trlib.pyx has not changed
scipy/sparse/csgraph/_traversal.pyx has not changed
scipy/sparse/csgraph/_tools.pyx has not changed
scipy/sparse/csgraph/_shortest_path.pyx has not changed
scipy/cluster/_vq.pyx has not changed
scipy/linalg/_solve_toeplitz.pyx has not changed
scipy/cluster/_hierarchy.pyx has not changed
scipy/linalg/_decomp_update.pyx.in has not changed
scipy/linalg/cython_lapack.pyx has not changed
scipy/linalg/cython_blas.pyx has not changed
scipy/ndimage/src/_cytest.pyx has not changed
scipy/_lib/_ccallback_c.pyx has not changed
scipy/_lib/messagestream.pyx has not changed
scipy/optimize/_lsq/givens_elimination.pyx has not changed
scipy/cluster/_optimal_leaf_ordering.pyx has not changed
scipy/ndimage/src/_ni_label.pyx has not changed
Running from SciPy source directory.
lapack_opt_info:
lapack_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE
openblas_lapack_info:
customize UnixCCompiler
customize UnixCCompiler
libraries openblas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE
openblas_clapack_info:
customize UnixCCompiler
customize UnixCCompiler
libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE
flame_info:
customize UnixCCompiler
libraries flame not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/lib/x86_64-linux-gnu
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE
atlas_3_10_info:
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries satlas,satlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries satlas,satlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
customize UnixCCompiler
libraries satlas,satlas not found in /usr/lib/x86_64-linux-gnu
<class 'numpy.distutils.system_info.atlas_3_10_info'>
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/lib/x86_64-linux-gnu
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE
atlas_info:
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/lib/x86_64-linux-gnu
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
accelerate_info:
NOT AVAILABLE
lapack_info:
customize UnixCCompiler
customize UnixCCompiler
FOUND:
libraries = ['lapack', 'lapack']
library_dirs = ['/usr/lib/x86_64-linux-gnu']
language = f77
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE
blis_info:
customize UnixCCompiler
libraries blis not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE
openblas_info:
customize UnixCCompiler
customize UnixCCompiler
libraries openblas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE
atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries tatlas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE
atlas_3_10_blas_info:
customize UnixCCompiler
libraries satlas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE
atlas_blas_info:
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE
/usr/local/lib/python3.7/dist-packages/numpy/distutils/system_info.py:690: UserWarning:
Optimized (vendor) Blas libraries are not found.
Falls back to netlib Blas library which has worse performance.
A better performance should be easily gained by switching
Blas library.
self.calc_info()
blas_info:
customize UnixCCompiler
customize UnixCCompiler
C compiler: x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
creating /tmp/tmpzx8uau81/tmp
creating /tmp/tmpzx8uau81/tmp/tmpzx8uau81
compile options: '-I/usr/local/include -I/usr/include -c'
x86_64-linux-gnu-gcc: /tmp/tmpzx8uau81/source.c
x86_64-linux-gnu-gcc -pthread /tmp/tmpzx8uau81/tmp/tmpzx8uau81/source.o -lblas -o /tmp/tmpzx8uau81/a.out
customize UnixCCompiler
FOUND:
libraries = ['blas', 'blas']
library_dirs = ['/usr/lib/x86_64-linux-gnu']
include_dirs = ['/usr/local/include', '/usr/include']
language = c
define_macros = [('HAVE_CBLAS', None)]
FOUND:
define_macros = [('NO_ATLAS_INFO', 1), ('HAVE_CBLAS', None)]
libraries = ['blas', 'blas']
library_dirs = ['/usr/lib/x86_64-linux-gnu']
include_dirs = ['/usr/local/include', '/usr/include']
language = c
FOUND:
libraries = ['lapack', 'lapack', 'blas', 'blas']
library_dirs = ['/usr/lib/x86_64-linux-gnu']
language = c
define_macros = [('NO_ATLAS_INFO', 1), ('HAVE_CBLAS', None)]
include_dirs = ['/usr/local/include', '/usr/include']
non-existing path in 'scipy/fft/_pocketfft': '/home/justin/.local/include/python3.7m'
non-existing path in 'scipy/fft/_pocketfft': '/usr/local/include/python3.7'
non-existing path in 'scipy/interpolate': 'src/multipack.h'
/usr/local/lib/python3.7/dist-packages/numpy/distutils/system_info.py:782: UserWarning: Specified path /usr/local/include/python3.7m is invalid.
return self.get_paths(self.section, key)
non-existing path in 'scipy/signal/windows': 'tests'
[makenpz] scipy/special/tests/data/boost.npz is already up to date
[makenpz] scipy/special/tests/data/gsl.npz is already up to date
[makenpz] scipy/special/tests/data/local.npz is already up to date
running install
running bdist_egg
running egg_info
running build_src
build_src
building py_modules sources
building library "mach" sources
building library "quadpack" sources
building library "lsoda" sources
building library "vode" sources
building library "dop" sources
building library "fitpack" sources
building library "fwrappers" sources
building library "odrpack" sources
building library "minpack" sources
building library "rectangular_lsap" sources
building library "rootfind" sources
building library "superlu_src" sources
building library "arpack_scipy" sources
building library "sc_cephes" sources
building library "sc_mach" sources
building library "sc_amos" sources
building library "sc_cdf" sources
building library "sc_specfun" sources
building library "statlib" sources
building extension "scipy.cluster._vq" sources
building extension "scipy.cluster._hierarchy" sources
building extension "scipy.cluster._optimal_leaf_ordering" sources
building extension "scipy.fft._pocketfft.pypocketfft" sources
building extension "scipy.fftpack.convolve" sources
building extension "scipy.integrate._quadpack" sources
building extension "scipy.integrate._odepack" sources
building extension "scipy.integrate.vode" sources
f2py options: []
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/integrate/fortranobject.c' to sources.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/integrate' to include_dirs.
building extension "scipy.integrate.lsoda" sources
f2py options: []
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/integrate/fortranobject.c' to sources.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/integrate' to include_dirs.
building extension "scipy.integrate._dop" sources
f2py options: []
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/integrate/fortranobject.c' to sources.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/integrate' to include_dirs.
building extension "scipy.integrate._test_multivariate" sources
building extension "scipy.integrate._test_odeint_banded" sources
f2py options: []
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/integrate/fortranobject.c' to sources.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/integrate' to include_dirs.
adding 'build/src.linux-x86_64-3.7/scipy/integrate/_test_odeint_banded-f2pywrappers.f' to sources.
building extension "scipy.interpolate.interpnd" sources
building extension "scipy.interpolate._ppoly" sources
building extension "scipy.interpolate._bspl" sources
building extension "scipy.interpolate._fitpack" sources
building extension "scipy.interpolate.dfitpack" sources
f2py options: []
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/interpolate/src/fortranobject.c' to sources.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/interpolate/src' to include_dirs.
adding 'build/src.linux-x86_64-3.7/scipy/interpolate/src/dfitpack-f2pywrappers.f' to sources.
building extension "scipy.io._test_fortran" sources
f2py options: []
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/io/fortranobject.c' to sources.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/io' to include_dirs.
building extension "scipy.io.matlab.streams" sources
building extension "scipy.io.matlab.mio_utils" sources
building extension "scipy.io.matlab.mio5_utils" sources
building extension "scipy.linalg._fblas" sources
f2py options: []
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/linalg/fortranobject.c' to sources.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/linalg' to include_dirs.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/linalg/_fblas-f2pywrappers.f' to sources.
building extension "scipy.linalg._flapack" sources
f2py options: []
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/linalg/fortranobject.c' to sources.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/linalg' to include_dirs.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/linalg/_flapack-f2pywrappers.f' to sources.
building extension "scipy.linalg._flinalg" sources
f2py options: []
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/linalg/fortranobject.c' to sources.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/linalg' to include_dirs.
building extension "scipy.linalg._interpolative" sources
f2py options: []
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/linalg/fortranobject.c' to sources.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/linalg' to include_dirs.
building extension "scipy.linalg._solve_toeplitz" sources
building extension "scipy.linalg.cython_blas" sources
building extension "scipy.linalg.cython_lapack" sources
building extension "scipy.linalg._decomp_update" sources
building extension "scipy.odr.__odrpack" sources
building extension "scipy.optimize._minpack" sources
building extension "scipy.optimize._lsap_module" sources
building extension "scipy.optimize._zeros" sources
building extension "scipy.optimize._lbfgsb" sources
f2py options: []
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/optimize/lbfgsb_src/fortranobject.c' to sources.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/optimize/lbfgsb_src' to include_dirs.
building extension "scipy.optimize.moduleTNC" sources
building extension "scipy.optimize._cobyla" sources
f2py options: []
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/optimize/cobyla/fortranobject.c' to sources.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/optimize/cobyla' to include_dirs.
building extension "scipy.optimize.minpack2" sources
f2py options: []
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/optimize/minpack2/fortranobject.c' to sources.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/optimize/minpack2' to include_dirs.
building extension "scipy.optimize._slsqp" sources
f2py options: []
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/optimize/slsqp/fortranobject.c' to sources.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/optimize/slsqp' to include_dirs.
building extension "scipy.optimize._nnls" sources
f2py options: []
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/optimize/nnls/fortranobject.c' to sources.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/optimize/nnls' to include_dirs.
building extension "scipy.optimize._group_columns" sources
building extension "scipy.optimize._bglu_dense" sources
building extension "scipy.optimize._lsq.givens_elimination" sources
building extension "scipy.optimize._trlib._trlib" sources
building extension "scipy.optimize.cython_optimize._zeros" sources
building extension "scipy.signal.sigtools" sources
building extension "scipy.signal._spectral" sources
building extension "scipy.signal._max_len_seq_inner" sources
building extension "scipy.signal._peak_finding_utils" sources
building extension "scipy.signal._sosfilt" sources
building extension "scipy.signal._upfirdn_apply" sources
building extension "scipy.signal.spline" sources
building extension "scipy.sparse.linalg.isolve._iterative" sources
f2py options: []
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/sparse/linalg/isolve/iterative/fortranobject.c' to sources.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/sparse/linalg/isolve/iterative' to include_dirs.
building extension "scipy.sparse.linalg.dsolve._superlu" sources
building extension "scipy.sparse.linalg.eigen.arpack._arpack" sources
f2py options: []
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/sparse/linalg/eigen/arpack/fortranobject.c' to sources.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/sparse/linalg/eigen/arpack' to include_dirs.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/sparse/linalg/eigen/arpack/_arpack-f2pywrappers.f' to sources.
building extension "scipy.sparse.csgraph._shortest_path" sources
building extension "scipy.sparse.csgraph._traversal" sources
building extension "scipy.sparse.csgraph._min_spanning_tree" sources
building extension "scipy.sparse.csgraph._matching" sources
building extension "scipy.sparse.csgraph._flow" sources
building extension "scipy.sparse.csgraph._reordering" sources
building extension "scipy.sparse.csgraph._tools" sources
building extension "scipy.sparse._csparsetools" sources
building extension "scipy.sparse._sparsetools" sources
[generate_sparsetools] 'scipy/sparse/sparsetools/bsr_impl.h' already up-to-date
[generate_sparsetools] 'scipy/sparse/sparsetools/csr_impl.h' already up-to-date
[generate_sparsetools] 'scipy/sparse/sparsetools/csc_impl.h' already up-to-date
[generate_sparsetools] 'scipy/sparse/sparsetools/other_impl.h' already up-to-date
[generate_sparsetools] 'scipy/sparse/sparsetools/sparsetools_impl.h' already up-to-date
building extension "scipy.spatial.qhull" sources
building extension "scipy.spatial.ckdtree" sources
building extension "scipy.spatial._distance_wrap" sources
building extension "scipy.spatial._voronoi" sources
building extension "scipy.spatial._hausdorff" sources
building extension "scipy.special.specfun" sources
f2py options: ['--no-wrap-functions']
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/special/fortranobject.c' to sources.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/special' to include_dirs.
building extension "scipy.special._ufuncs" sources
building extension "scipy.special._ufuncs_cxx" sources
building extension "scipy.special._ellip_harm_2" sources
building extension "scipy.special.cython_special" sources
building extension "scipy.special._comb" sources
building extension "scipy.special._test_round" sources
building extension "scipy.stats.statlib" sources
f2py options: ['--no-wrap-functions']
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/stats/fortranobject.c' to sources.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/stats' to include_dirs.
building extension "scipy.stats._stats" sources
building extension "scipy.stats.mvn" sources
f2py options: []
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/stats/fortranobject.c' to sources.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/stats' to include_dirs.
adding 'build/src.linux-x86_64-3.7/scipy/stats/mvn-f2pywrappers.f' to sources.
building extension "scipy.ndimage._nd_image" sources
building extension "scipy.ndimage._ni_label" sources
building extension "scipy.ndimage._ctest" sources
building extension "scipy.ndimage._ctest_oldapi" sources
building extension "scipy.ndimage._cytest" sources
building extension "scipy._lib._ccallback_c" sources
building extension "scipy._lib._test_ccallback" sources
building extension "scipy._lib._fpumode" sources
building extension "scipy._lib.messagestream" sources
get_default_fcompiler: matching types: '['gnu95', 'intel', 'lahey', 'pg', 'absoft', 'nag', 'vast', 'compaq', 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor']'
customize Gnu95FCompiler
Found executable /usr/bin/gfortran
customize Gnu95FCompiler
customize Gnu95FCompiler using config
C compiler: x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
compile options: '-I/usr/include/python3.7m -c'
x86_64-linux-gnu-gcc: _configtest.c
x86_64-linux-gnu-gcc -pthread _configtest.o -o _configtest
success!
removing: _configtest.c _configtest.o _configtest.o.d _configtest
building extension "scipy._lib._uarray._uarray" sources
building data_files sources
build_src: building npy-pkg config files
writing scipy.egg-info/PKG-INFO
writing dependency_links to scipy.egg-info/dependency_links.txt
writing top-level names to scipy.egg-info/top_level.txt
reading manifest file 'scipy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching 'subr.f' found under directory 'scipy/linalg/src/id_dist/src'
no previously-included directories found matching 'benchmarks/env'
no previously-included directories found matching 'benchmarks/results'
no previously-included directories found matching 'benchmarks/html'
no previously-included directories found matching 'benchmarks/scipy'
no previously-included directories found matching 'doc/build'
no previously-included directories found matching 'doc/source/generated'
warning: no previously-included files matching '~' found anywhere in distribution
warning: no previously-included files matching '.bak' found anywhere in distribution
warning: no previously-included files matching '.swp' found anywhere in distribution
warning: no previously-included files matching '.pyo' found anywhere in distribution
writing manifest file 'scipy.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running build_clib
customize UnixCCompiler
customize UnixCCompiler using build_clib
get_default_fcompiler: matching types: '['gnu95', 'intel', 'lahey', 'pg', 'absoft', 'nag', 'vast', 'compaq', 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor']'
customize Gnu95FCompiler
customize Gnu95FCompiler
customize Gnu95FCompiler using build_clib
building 'sc_cephes' library
compiling C sources
C compiler: x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
compile options: '-I/home/justin/scipy/scipy/special -I/usr/local/lib/python3.7/dist-packages/numpy/core/include -I/usr/include/python3.7m -Iscipy/_lib -I/usr/local/lib/python3.7/dist-packages/numpy/core/include -I/usr/include/python3.7m -c'
running install_lib
running build_py
copying scipy/version.py -> build/lib.linux-x86_64-3.7/scipy
copying build/src.linux-x86_64-3.7/scipy/config.py -> build/lib.linux-x86_64-3.7/scipy
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
resetting extension 'scipy.integrate._quadpack' language from 'c' to 'f77'.
resetting extension 'scipy.integrate._odepack' language from 'c' to 'f77'.
resetting extension 'scipy.integrate.vode' language from 'c' to 'f77'.
resetting extension 'scipy.integrate.lsoda' language from 'c' to 'f77'.
resetting extension 'scipy.integrate._test_odeint_banded' language from 'c' to 'f77'.
resetting extension 'scipy.linalg._fblas' language from 'c' to 'f77'.
resetting extension 'scipy.linalg._flapack' language from 'c' to 'f77'.
resetting extension 'scipy.linalg._flinalg' language from 'c' to 'f77'.
resetting extension 'scipy.linalg._interpolative' language from 'c' to 'f77'.
resetting extension 'scipy.linalg.cython_blas' language from 'c' to 'f77'.
resetting extension 'scipy.linalg.cython_lapack' language from 'c' to 'f77'.
resetting extension 'scipy.odr.__odrpack' language from 'c' to 'f77'.
resetting extension 'scipy.optimize._lbfgsb' language from 'c' to 'f77'.
resetting extension 'scipy.sparse.linalg.isolve._iterative' language from 'c' to 'f77'.
extending extension 'scipy.sparse.linalg.dsolve._superlu' defined_macros with [('USE_VENDOR_BLAS', 1)]
resetting extension 'scipy.sparse.linalg.eigen.arpack._arpack' language from 'c' to 'f77'.
resetting extension 'scipy.special._ufuncs' language from 'c' to 'f77'.
resetting extension 'scipy.special.cython_special' language from 'c' to 'f77'.
customize UnixCCompiler
customize UnixCCompiler using build_ext
get_default_fcompiler: matching types: '['gnu95', 'intel', 'lahey', 'pg', 'absoft', 'nag', 'vast', 'compaq', 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor']'
customize Gnu95FCompiler
customize Gnu95FCompiler
customize Gnu95FCompiler using build_ext
C compiler: x86_64-linux-gnu-g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
creating /tmp/tmp0jf12nzs/tmp
creating /tmp/tmp0jf12nzs/tmp/tmp0jf12nzs
compile options: '-I/usr/include/python3.7m -c'
extra options: '-std=c++14'
x86_64-linux-gnu-g++: /tmp/tmp0jf12nzs/main.c
C compiler: x86_64-linux-gnu-g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
creating /tmp/tmpzk513g1j/tmp
creating /tmp/tmpzk513g1j/tmp/tmpzk513g1j
compile options: '-I/usr/include/python3.7m -c'
extra options: '-std=c++14 -fvisibility=hidden'
x86_64-linux-gnu-g++: /tmp/tmpzk513g1j/main.c
C compiler: x86_64-linux-gnu-g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
creating /tmp/tmp_f0bta4x/tmp
creating /tmp/tmp_f0bta4x/tmp/tmp_f0bta4x
compile options: '-I/usr/include/python3.7m -c'
x86_64-linux-gnu-g++: /tmp/tmp_f0bta4x/main.c
building 'scipy.fft._pocketfft.pypocketfft' extension
compiling C++ sources
C compiler: x86_64-linux-gnu-g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
compile options: '-DPOCKETFFT_PTHREADS -I/home/justin/.local/include/python3.7m -I/usr/local/include/python3.7 -I/usr/local/lib/python3.7/dist-packages/numpy/core/include -I/usr/include/python3.7m -c'
extra options: '-std=c++14 -fvisibility=hidden'
x86_64-linux-gnu-g++: scipy/fft/_pocketfft/pypocketfft.cxx
scipy/fft/_pocketfft/pypocketfft.cxx: In function ‘pocketfft::detail::shape_t {anonymous}::makeaxes(const pybind11::array&, const pybind11::object&)’:
scipy/fft/_pocketfft/pypocketfft.cxx:74:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((sz>=ndim) || (sz<0))
~~^~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx: At global scope:
scipy/fft/_pocketfft/pypocketfft.cxx:707:16: error: expected constructor, destructor, or type conversion before ‘(’ token
PYBIND11_MODULE(pypocketfft, m)
^
scipy/fft/_pocketfft/pypocketfft.cxx: In instantiation of ‘pybind11::array_t {anonymous}::prepare_output(pybind11::object&, pocketfft::detail::shape_t&) [with T = std::complex; pocketfft::detail::shape_t = std::vector]’:
scipy/fft/_pocketfft/pypocketfft.cxx:122:40: required from ‘pybind11::array {anonymous}::c2c_internal(const pybind11::array&, const pybind11::object&, bool, int, pybind11::object&, size_t) [with T = double; size_t = long unsigned int]’
scipy/fft/_pocketfft/pypocketfft.cxx:168:5: required from here
scipy/fft/pocketfft/pypocketfft.cxx:111:12: error: ‘class pybind11::array_t<std::complex >’ has no member named ‘is’
if (!tmp.is(out)) // a new object was created during casting
~~~~^~
scipy/fft/_pocketfft/pypocketfft.cxx: In instantiation of ‘pybind11::array_t {anonymous}::prepare_output(pybind11::object&, pocketfft::detail::shape_t&) [with T = std::complex; pocketfft::detail::shape_t = std::vector]’:
scipy/fft/_pocketfft/pypocketfft.cxx:122:40: required from ‘pybind11::array {anonymous}::c2c_internal(const pybind11::array&, const pybind11::object&, bool, int, pybind11::object&, size_t) [with T = float; size_t = long unsigned int]’
scipy/fft/_pocketfft/pypocketfft.cxx:168:5: required from here
scipy/fft/_pocketfft/pypocketfft.cxx:111:12: error: ‘class pybind11::array_t<std::complex >’ has no member named ‘is’
scipy/fft/_pocketfft/pypocketfft.cxx: In instantiation of ‘pybind11::array_t {anonymous}::prepare_output(pybind11::object&, pocketfft::detail::shape_t&) [with T = std::complex; pocketfft::detail::shape_t = std::vector]’:
scipy/fft/_pocketfft/pypocketfft.cxx:122:40: required from ‘pybind11::array {anonymous}::c2c_internal(const pybind11::array&, const pybind11::object&, bool, int, pybind11::object&, size_t) [with T = long double; size_t = long unsigned int]’
scipy/fft/_pocketfft/pypocketfft.cxx:168:5: required from here
scipy/fft/_pocketfft/pypocketfft.cxx:111:12: error: ‘class pybind11::array_t<std::complex >’ has no member named ‘is’
scipy/fft/_pocketfft/pypocketfft.cxx: In instantiation of ‘pybind11::array_t {anonymous}::prepare_output(pybind11::object&, pocketfft::detail::shape_t&) [with T = double; pocketfft::detail::shape_t = std::vector]’:
scipy/fft/_pocketfft/pypocketfft.cxx:209:36: required from ‘pybind11::array {anonymous}::r2r_fftpack_internal(const pybind11::array&, const pybind11::object&, bool, bool, int, pybind11::object&, size_t) [with T = double; size_t = long unsigned int]’
scipy/fft/_pocketfft/pypocketfft.cxx:227:3: required from here
scipy/fft/_pocketfft/pypocketfft.cxx:111:12: error: ‘class pybind11::array_t’ has no member named ‘is’
scipy/fft/_pocketfft/pypocketfft.cxx: In instantiation of ‘pybind11::array_t {anonymous}::prepare_output(pybind11::object&, pocketfft::detail::shape_t&) [with T = float; pocketfft::detail::shape_t = std::vector]’:
scipy/fft/_pocketfft/pypocketfft.cxx:209:36: required from ‘pybind11::array {anonymous}::r2r_fftpack_internal(const pybind11::array&, const pybind11::object&, bool, bool, int, pybind11::object&, size_t) [with T = float; size_t = long unsigned int]’
scipy/fft/_pocketfft/pypocketfft.cxx:227:3: required from here
scipy/fft/_pocketfft/pypocketfft.cxx:111:12: error: ‘class pybind11::array_t’ has no member named ‘is’
scipy/fft/_pocketfft/pypocketfft.cxx: In instantiation of ‘pybind11::array_t {anonymous}::prepare_output(pybind11::object&, pocketfft::detail::shape_t&) [with T = long double; pocketfft::detail::shape_t = std::vector]’:
scipy/fft/_pocketfft/pypocketfft.cxx:209:36: required from ‘pybind11::array {anonymous}::r2r_fftpack_internal(const pybind11::array&, const pybind11::object&, bool, bool, int, pybind11::object&, size_t) [with T = long double; size_t = long unsigned int]’
scipy/fft/_pocketfft/pypocketfft.cxx:227:3: required from here
scipy/fft/_pocketfft/pypocketfft.cxx:111:12: error: ‘class pybind11::array_t’ has no member named ‘is’
In file included from scipy/fft/_pocketfft/pypocketfft.cxx:16:0:
/usr/include/pybind11/numpy.h: In instantiation of ‘static pybind11::dtype pybind11::dtype::of() [with T = std::complex]’:
/usr/include/pybind11/numpy.h:636:92: required from ‘static bool pybind11::array_t<T, ExtraFlags>::_check(pybind11::handle) [with T = std::complex; int ExtraFlags = 16]’
/usr/include/pybind11/pytypes.h:160:47: required from ‘bool pybind11::isinstance(pybind11::handle) [with T = pybind11::array_t<std::complex >; typename std::enable_if<std::is_base_of<pybind11::object, T>::value, int>::type = 0]’
scipy/fft/_pocketfft/pypocketfft.cxx:168:5: required from here
/usr/include/pybind11/numpy.h:260:86: error: ‘dtype’ is not a member of ‘pybind11::detail::npy_format_descriptor<std::complex, void>’
eturn detail::npy_format_descriptor<typename std::remove_cv::type>::dtype();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
scipy/fft/_pocketfft/pypocketfft.cxx:689:14: warning: ‘{anonymous}::good_size_DS’ defined but not used [-Wunused-variable]
const char * good_size_DS = R"""(Returns a good length to pad an FFT to.
^~~~~~~~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:651:13: warning: ‘{anonymous}::dst_DS’ defined but not used [-Wunused-variable]
const char *dst_DS = R"""(Performs a discrete sine transform.
^~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:612:13: warning: ‘{anonymous}::dct_DS’ defined but not used [-Wunused-variable]
const char *dct_DS = R"""(Performs a discrete cosine transform.
^~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:580:13: warning: ‘{anonymous}::genuine_hartley_DS’ defined but not used [-Wunused-variable]
const char *genuine_hartley_DS = R"""(Performs a full Hartley transform.
^~~~~~~~~~~~~~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:549:13: warning: ‘{anonymous}::separable_hartley_DS’ defined but not used [-Wunused-variable]
const char *separable_hartley_DS = R"""(Performs a separable Hartley transform.
^~~~~~~~~~~~~~~~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:515:13: warning: ‘{anonymous}::r2r_fftpack_DS’ defined but not used [-Wunused-variable]
const char *r2r_fftpack_DS = R"""(Performs a real-valued FFT using the FFTPACK storage scheme.
^~~~~~~~~~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:480:13: warning: ‘{anonymous}::c2r_DS’ defined but not used [-Wunused-variable]
const char *c2r_DS = R"""(Performs an FFT whose output is strictly real.
^~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:447:13: warning: ‘{anonymous}::r2c_DS’ defined but not used [-Wunused-variable]
const char r2c_DS = R"""(Performs an FFT whose input is strictly real.
^~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:416:13: warning: ‘{anonymous}::c2c_DS’ defined but not used [-Wunused-variable]
const char c2c_DS = R"""(Performs a complex FFT.
^~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:404:13: warning: ‘{anonymous}::pypocketfft_DS’ defined but not used [-Wunused-variable]
const char pypocketfft_DS = R"""(Fast Fourier and Hartley transforms.
^~~~~~~~~~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:380:13: warning: ‘PyObject {anonymous}::good_size(PyObject, PyObject)’ defined but not used [-Wunused-function]
PyObject * good_size(PyObject * self, PyObject * args)
^~~~~~~~~
scipy/fft/pocketfft/pypocketfft.cxx:373:11: warning: ‘pybind11::array {anonymous}::genuine_hartley(const pybind11::array&, const pybind11::object&, int, pybind11::object&, size_t)’ defined but not used [-Wunused-function]
py::array genuine_hartley(const py::array &in, const py::object &axes,
^~~~~~~~~~~~~~~
scipy/fft/pocketfft/pypocketfft.cxx:342:11: warning: ‘pybind11::array {anonymous}::separable_hartley(const pybind11::array&, const pybind11::object&, int, pybind11::object&, size_t)’ defined but not used [-Wunused-function]
py::array separable_hartley(const py::array &in, const py::object &axes,
^~~~~~~~~~~~~~~~~
scipy/fft/pocketfft/pypocketfft.cxx:316:11: warning: ‘pybind11::array {anonymous}::c2r(const pybind11::array&, const pybind11::object&, size_t, bool, int, pybind11::object&, size_t)’ defined but not used [-Wunused-function]
py::array c2r(const py::array &in, const py::object &axes, size_t lastsize,
^~~
scipy/fft/pocketfft/pypocketfft.cxx:283:11: warning: ‘pybind11::array {anonymous}::dst(const pybind11::array&, int, const pybind11::object&, int, pybind11::object&, size_t)’ defined but not used [-Wunused-function]
py::array dst(const py::array &in, int type, const py::object &axes,
^~~
scipy/fft/pocketfft/pypocketfft.cxx:253:11: warning: ‘pybind11::array {anonymous}::dct(const pybind11::array&, int, const pybind11::object&, int, pybind11::object&, size_t)’ defined but not used [-Wunused-function]
py::array dct(const py::array &in, int type, const py::object &axes,
^~~
scipy/fft/pocketfft/pypocketfft.cxx:223:11: warning: ‘pybind11::array {anonymous}::r2r_fftpack(const pybind11::array&, const pybind11::object&, bool, bool, int, pybind11::object&, size_t)’ defined but not used [-Wunused-function]
py::array r2r_fftpack(const py::array &in, const py::object &axes,
^~~~~~~~~~~
scipy/fft/pocketfft/pypocketfft.cxx:164:11: warning: ‘pybind11::array {anonymous}::c2c(const pybind11::array&, const pybind11::object&, bool, int, pybind11::object&, size_t)’ defined but not used [-Wunused-function]
py::array c2c(const py::array &a, const py::object &axes, bool forward,
^~~
error: Command "x86_64-linux-gnu-g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPOCKETFFT_PTHREADS -I/home/justin/.local/include/python3.7m -I/usr/local/include/python3.7 -I/usr/local/lib/python3.7/dist-packages/numpy/core/include -I/usr/include/python3.7m -c scipy/fft/_pocketfft/pypocketfft.cxx -o build/temp.linux-x86_64-3.7/scipy/fft/_pocketfft/pypocketfft.o -MMD -MF build/temp.linux-x86_64-3.7/scipy/fft/_pocketfft/pypocketfft.o.d -std=c++14 -fvisibility=hidden" failed with exit status 1
justin@justin-System-Product-Name:~/scipy$
Is this simply a function of having the wrong version of pybind, or is this an error in the most recent development release of the source code?
Hi,
I can build the docs with Sphinx using make html
but when I open the html files I can't see any of the function docstrings. I'm new to Sphinx so I might be missing something.
when i do: "pip install kivy":
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-ip89re86/kivy/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-mwsoti_q-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-ip89re86/kivy/
can someone help me pls? i tried whit "pip3 install kivy" but it do not work too...
If I clone this repo, it works great. If I add some simple pybind11/numpy functionality (passing a numpy array in and out), I run into trouble on OSX, when trying to build a conda package.
Perhaps adding a little pybind/numpy to this example repo would be cool. Probably this is something simple that more seasoned OSX-linking-gurus can spot easily, but it eludes me after a few days of messing around with it.
Here is what the conda build tests have to say:
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_pyopcode.py:1: in <module>
import numpy as np
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.8/site-packages/numpy/__init__.py:142: in <module>
from . import add_newdocs
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.8/site-packages/numpy/add_newdocs.py:13: in <module>
from numpy.lib import add_newdoc
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.8/site-packages/numpy/lib/__init__.py:8: in <module>
from .type_check import *
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.8/site-packages/numpy/lib/type_check.py:11: in <module>
import numpy.core.numeric as _nx
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.8/site-packages/numpy/core/__init__.py:14: in <module>
from . import multiarray
E ImportError: dlopen($PREFIX/lib/python3.8/site-packages/numpy/core/multiarray.cpython-38-darwin.so, 2): Library not loaded: @rpath/libopenblas.dylib
E Referenced from: $PREFIX/lib/python3.8/site-packages/numpy/core/multiarray.cpython-38-darwin.so
E Reason: image not found
Hi all,
Thanks for a great package! I'm trying to upload my package (https://github.com/franklynwang/quick-sketches) to PyPi. My Github Actions (https://github.com/franklynwang/quick-sketches/runs/3083040093) work for everything except the upload, but the upload to pypi action says that I have an issue with my token, which I have triple-checked and it doesn't appear to be the case.
My wheels.yml file is here: https://github.com/franklynwang/quick-sketches/blob/master/.github/workflows/wheels.yml.
Please let me know what other information I can provide to be helpful.
Is there anywhere available example of creating between python with numpy and c++ opencv code? , eg.
cv::Mat process(cv::Mat& in, cv::Mat& out)
I have an virtual environment created using virtualenvwrapper that has issues with returning the appropriate path for the include directory for pybind11.get_include(). I just get 'include'. What can I do to correct
I have a working CMakeLists.txt file which generates both an executable (racplusplus_exe
) and a static library (racplusplus.cpython-311-darwin.so
) wrapped with pybind. The executable runs perfectly, and I can import the static library in python and run functions successfully.
When I use setup.py to python3 setup.py bdist_wheel
I get a wheel built in dist/racplusplus-0.9-cp311-cp311-macosx_13_0_x86_64.whl
. But whenever I try to pip install
the wheel I get the error "ERROR: racplusplus-0.9-cp311-cp311-macosx_13_0_x86_64.whl is not a supported wheel on this platform."
During the build output I see multiple lines with mention macosx 10.9 for some reason. ie: "installing to build/bdist.macosx-10.9-x86_64/wheel". So I wonder if somehow the wheel is being built for the wrong macOSX, even though the final wheel name has the correct OS?
I have tried manually setting
python os.environ["ARCHFLAGS"] = "-arch x86_64 -mmacosx-version-min=13.0"
and also manually setting
python os.environ['MACOSX_DEPLOYMENT_TARGET'] = '13.0'
in "setup.py", but neither of these environment variables seems to be respected.
Any ideas what's going on? Not sure this is inherently an issue with setup.py for newer OS's or if I'm not understanding how to specify the wheel architecture correctly.
I have cmake 3.12.4 and Python 3.7.1. I'm new to C++ development, so please excuse beginner errors.
pip install -e .
Obtaining file:///Users/ben/Documents/python_example
Requirement already satisfied: pybind11>=2.3 in /Users/ben/anaconda3/lib/python3.7/site-packages (from python-example==0.0.1) (2.3.0)
Installing collected packages: python-example
Running setup.py develop for python-example
Complete output from command /Users/ben/anaconda3/bin/python -c "import setuptools, tokenize;__file__='/Users/ben/Documents/python_example/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps:
running develop
running egg_info
writing python_example.egg-info/PKG-INFO
writing dependency_links to python_example.egg-info/dependency_links.txt
writing requirements to python_example.egg-info/requires.txt
writing top-level names to python_example.egg-info/top_level.txt
reading manifest file 'python_example.egg-info/SOURCES.txt'
writing manifest file 'python_example.egg-info/SOURCES.txt'
running build_ext
creating var
creating var/folders
creating var/folders/kx
creating var/folders/kx/k69hblm540zds7vpn8qvw2cr0000gn
creating var/folders/kx/k69hblm540zds7vpn8qvw2cr0000gn/T
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/ben/anaconda3/include -arch x86_64 -I/Users/ben/anaconda3/include -arch x86_64 -I/Users/ben/anaconda3/include/python3.7m -c /var/folders/kx/k69hblm540zds7vpn8qvw2cr0000gn/T/tmpgdjf3dye.cpp -o var/folders/kx/k69hblm540zds7vpn8qvw2cr0000gn/T/tmpgdjf3dye.o -std=c++17
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/ben/anaconda3/include -arch x86_64 -I/Users/ben/anaconda3/include -arch x86_64 -I/Users/ben/anaconda3/include/python3.7m -c /var/folders/kx/k69hblm540zds7vpn8qvw2cr0000gn/T/tmpr8dsmmzq.cpp -o var/folders/kx/k69hblm540zds7vpn8qvw2cr0000gn/T/tmpr8dsmmzq.o -fvisibility=hidden
building 'python_example' extension
creating build
creating build/temp.macosx-10.7-x86_64-3.7
creating build/temp.macosx-10.7-x86_64-3.7/src
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/ben/anaconda3/include -arch x86_64 -I/Users/ben/anaconda3/include -arch x86_64 -I/Users/ben/anaconda3/include/python3.7m -I/Users/ben/.local/include/python3.7m -I/Users/ben/anaconda3/include/python3.7m -c src/main.cpp -o build/temp.macosx-10.7-x86_64-3.7/src/main.o -stdlib=libc++ -mmacosx-version-min=10.7 -DVERSION_INFO="0.0.1" -std=c++17 -fvisibility=hidden
In file included from src/main.cpp:1:
/Users/ben/anaconda3/include/python3.7m/pybind11/pybind11.h:1009:9: error: call to unavailable function 'operator delete': introduced in macOS 10.12
::operator delete(p, s, std::align_val_t(a));
^~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/new:203:74: note: candidate function has been explicitly made unavailable
_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/new:201:36: note: candidate function not viable: no known conversion from 'pybind11::size_t' (aka 'unsigned long') to 'std::align_val_t' for 2nd argument
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/new:200:36: note: candidate function not viable: requires 2 arguments, but 3 were provided
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::align_val_t) _NOEXCEPT;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/new:184:36: note: candidate function not viable: requires 2 arguments, but 3 were provided
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, const std::nothrow_t&) _NOEXCEPT;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/new:186:74: note: candidate function not viable: requires 2 arguments, but 3 were provided
_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete(void* __p, std::size_t __sz) _NOEXCEPT;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/new:217:40: note: candidate function not viable: requires 2 arguments, but 3 were provided
inline _LIBCPP_INLINE_VISIBILITY void operator delete (void*, void*) _NOEXCEPT {}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/new:183:36: note: candidate function not viable: requires single argument '__p', but 3 arguments were provided
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p) _NOEXCEPT;
^
In file included from src/main.cpp:1:
/Users/ben/anaconda3/include/python3.7m/pybind11/pybind11.h:1011:9: error: call to unavailable function 'operator delete': introduced in macOS 10.12
::operator delete(p, s);
^~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/new:186:74: note: candidate function has been explicitly made unavailable
_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete(void* __p, std::size_t __sz) _NOEXCEPT;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/new:217:40: note: candidate function not viable: no known conversion from 'pybind11::size_t' (aka 'unsigned long') to 'void *' for 2nd argument; take the address of the argument with &
inline _LIBCPP_INLINE_VISIBILITY void operator delete (void*, void*) _NOEXCEPT {}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/new:184:36: note: candidate function not viable: no known conversion from 'pybind11::size_t' (aka 'unsigned long') to 'const std::nothrow_t' for 2nd argument
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, const std::nothrow_t&) _NOEXCEPT;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/new:200:36: note: candidate function not viable: no known conversion from 'pybind11::size_t' (aka 'unsigned long') to 'std::align_val_t' for 2nd argument
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::align_val_t) _NOEXCEPT;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/new:183:36: note: candidate function not viable: requires single argument '__p', but 2 arguments were provided
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p) _NOEXCEPT;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/new:201:36: note: candidate function not viable: requires 3 arguments, but 2 were provided
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/new:203:74: note: candidate function not viable: requires 3 arguments, but 2 were provided
_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT;
^
2 errors generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/Users/ben/anaconda3/bin/python -c "import setuptools, tokenize;__file__='/Users/ben/Documents/python_example/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps" failed with error code 1 in /Users/ben/Documents/python_example/
I'm sorry if this is a trivial question. I'm currently writing a package where only some functions are written in C++. It seems a bit redundant to me to split this in two packages. Is there a possibility to compile the C++-part as a submodule of the whole package whereas other submodules would be pure python?
When attempting to build the example on macOS 11, I get the following error:
$ pip install .
Processing /Users/drewcassidy/Projects/python_example
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Building wheels for collected packages: python-example
Building wheel for python-example (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /Users/drewcassidy/Projects/python_example/env/bin/python3 /Users/drewcassidy/Projects/python_example/env/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/01/8l9_pc0j3sg_0x2_ydzz4mzr0000gn/T/tmpdbjdwhmu
cwd: /private/var/folders/01/8l9_pc0j3sg_0x2_ydzz4mzr0000gn/T/pip-req-build-_a8us1o1
Complete output (11 lines):
running bdist_wheel
running build
running build_ext
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -I/usr/local/opt/llvm/include -I/usr/local/opt/gettext/include -I/Users/drewcassidy/Projects/python_example/env/include -I/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c flagcheck.cpp -o flagcheck.o -std=c++17
building 'python_example' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -I/usr/local/opt/llvm/include -I/usr/local/opt/gettext/include -DVERSION_INFO=0.0.1 -I/private/var/folders/01/8l9_pc0j3sg_0x2_ydzz4mzr0000gn/T/pip-build-env-nm37cieu/overlay/lib/python3.8/site-packages/pybind11/include -I/Users/drewcassidy/Projects/python_example/env/include -I/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c src/main.cpp -o build/temp.macosx-10.14.6-x86_64-3.8/src/main.o -std=c++17 -mmacosx-version-min=10.14 -fvisibility=hidden -g0 -stdlib=libc++
clang++ -bundle -undefined dynamic_lookup -Wl,-headerpad,0x1000 -arch arm64 -arch x86_64 -L/usr/local/opt/llvm/lib -L/usr/local/opt/gettext/lib -I/usr/local/opt/llvm/include -I/usr/local/opt/gettext/include build/temp.macosx-10.14.6-x86_64-3.8/src/main.o -o build/lib.macosx-10.14.6-x86_64-3.8/python_example.cpython-38-darwin.so -mmacosx-version-min=10.14 -stdlib=libc++
ld: warning: ignoring file /usr/local/opt/llvm/lib/libc++.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: in '/usr/local/opt/llvm/lib/libunwind.dylib', building for macOS-arm64 but attempting to link with file built for macOS-x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang++' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for python-example
Failed to build python-example
ERROR: Could not build wheels for python-example which use PEP 517 and cannot be installed directly
It seems like its trying to do a cross platform build, but a dylib is is only available on x86-64, and with how opaque the build options are with pip/setuptools I don't know how to tell it to just build for x86-64. Is this something that could be fixed in the setup.py file?
When attempting to install the example, the build fails with the error below.
After manually removing the C++17 flag option (I suppose C++14 was selected then) the install was successful. Can you share what I was doing wrong?
System information:
MacOS Mojave 10.14.6
Python 3.8.0
Clang compiler information:
Apple clang version 11.0.0 (clang-1100.0.33.12)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
╰─$ pip install ./python_example
Processing ./python_example
Requirement already satisfied: pybind11>=2.4 in /Users/guyarad/.pyenv/versions/3.8.0/lib/python3.8/site-packages (from python-example==0.0.1) (2.4.3)
Building wheels for collected packages: python-example
Building wheel for python-example (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /Users/guyarad/.pyenv/versions/3.8.0/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/gn/h71xdt2s77qd8yx32bp9hhr80000gn/T/pip-req-build-0pg446vd/setup.py'"'"'; __file__='"'"'/private/var/folders/gn/h71xdt2s77qd8yx32bp9hhr80000gn/T/pip-req-build-0pg446vd/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/gn/h71xdt2s77qd8yx32bp9hhr80000gn/T/pip-wheel-f3cb3qjg --python-tag cp38
cwd: /private/var/folders/gn/h71xdt2s77qd8yx32bp9hhr80000gn/T/pip-req-build-0pg446vd/
Complete output (38 lines):
running bdist_wheel
running build
running build_ext
creating var
creating var/folders
creating var/folders/gn
creating var/folders/gn/h71xdt2s77qd8yx32bp9hhr80000gn
creating var/folders/gn/h71xdt2s77qd8yx32bp9hhr80000gn/T
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Users/guyarad/.pyenv/versions/3.8.0/include/python3.8 -c /var/folders/gn/h71xdt2s77qd8yx32bp9hhr80000gn/T/tmpm_vh2ear.cpp -o var/folders/gn/h71xdt2s77qd8yx32bp9hhr80000gn/T/tmpm_vh2ear.o -std=c++17
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Users/guyarad/.pyenv/versions/3.8.0/include/python3.8 -c /var/folders/gn/h71xdt2s77qd8yx32bp9hhr80000gn/T/tmpk1ewzi28.cpp -o var/folders/gn/h71xdt2s77qd8yx32bp9hhr80000gn/T/tmpk1ewzi28.o -fvisibility=hidden
building 'python_example' extension
creating build
creating build/temp.macosx-10.14-x86_64-3.8
creating build/temp.macosx-10.14-x86_64-3.8/src
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Users/guyarad/.pyenv/versions/3.8.0/include/python3.8 -I/Users/guyarad/.local/include/python3.8 -I/Users/guyarad/.pyenv/versions/3.8.0/include/python3.8 -c src/main.cpp -o build/temp.macosx-10.14-x86_64-3.8/src/main.o -stdlib=libc++ -mmacosx-version-min=10.7 -DVERSION_INFO="0.0.1" -std=c++17 -fvisibility=hidden
In file included from src/main.cpp:1:
In file included from /Users/guyarad/.pyenv/versions/3.8.0/include/python3.8/pybind11/pybind11.h:44:
In file included from /Users/guyarad/.pyenv/versions/3.8.0/include/python3.8/pybind11/attr.h:13:
/Users/guyarad/.pyenv/versions/3.8.0/include/python3.8/pybind11/cast.h:579:34: error: aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on macOS 10.14 or newer
vptr = ::operator new(type->type_size,
^
/Users/guyarad/.pyenv/versions/3.8.0/include/python3.8/pybind11/cast.h:579:34: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic
In file included from src/main.cpp:1:
/Users/guyarad/.pyenv/versions/3.8.0/include/python3.8/pybind11/pybind11.h:1008:11: error: 'operator delete' is unavailable: introduced in macOS 10.12
::operator delete(p, s, std::align_val_t(a));
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:194:74: note: 'operator delete' has been explicitly marked unavailable here
_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT;
^
In file included from src/main.cpp:1:
/Users/guyarad/.pyenv/versions/3.8.0/include/python3.8/pybind11/pybind11.h:1010:11: error: 'operator delete' is unavailable: introduced in macOS 10.12
::operator delete(p, s);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:177:74: note: 'operator delete' has been explicitly marked unavailable here
_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete(void* __p, std::size_t __sz) _NOEXCEPT;
^
3 errors generated.
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for python-example
Running setup.py clean for python-example
Failed to build python-example
What about the pygrep hooks for the RST files we added recently. Those seem quite useful.
Originally posted by @Skylion007 in #91 (comment)
While trying to use pybind11 for interfacing a hybrid C/C++ codebase, following your example project, I encountered the following problem:
If the source files are a mix of C and C++ files, some compilers (most notably clang) complain and stop if the "-std=c++14" flag is supplied when compiling a C file.
This is of course completely reasonable, but even after extensive searching on the web I did not find a way to specify separate C and C++ compilation flags to setuptools (in analogy to CFLAGS and CXXFLAGS use by autotools).
Do you happen to know a trick how to achieve this? If so, I think it would be great if this could be added to your test project, to illustrate how it is done!
I am using Ubuntu 16.06 and python 3.6.3.
Install pybind using:
pip3 install pybind11
The error I get is:
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/simson/local_env/include -I/usr/include/python3.6m -c /tmp/tmp8qrex4xk.cpp -o tmp/tmp8qrex4xk.o -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/simson/local_env/include -I/usr/include/python3.6m -c /tmp/tmp3i7k987z.cpp -o tmp/tmp3i7k987z.o -fvisibility=hidden
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
building 'python_example' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iinclude -Iinclude -I/home/simson/local_env/include -I/usr/include/python3.6m -c src/main.cpp -o build/temp.linux-x86_64-3.6/src/main.o -DVERSION_INFO="0.0.1" -std=c++14 -fvisibility=hidden
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
src/main.cpp:1:31: fatal error: pybind11/pybind11.h: No such file or directory
compilation terminated.
I checked and pybind11.h does exist in the site-packages of the local environment
Was this tested on Ubuntu 16.04?
These changes help PyOpenCL build with pybind11 on MinGW:
https://gitlab.tiker.net/inducer/pyopencl/merge_requests/52/diffs
It would likely be useful to incorporate them here as well.
cc @isuruf
I tried to pip install
the repo in a conda environment and VS19. I got the following error. (I do have installed the "Microsoft Visual C++ 2015-2019 Redistributable - 14.25.28508" for x86 and x64.)
(pybindenv) C:\Users\Leo\Source\Repos\pybind>pip install .
Processing c:\users\leo\source\repos\pybind
Building wheels for collected packages: python-example
Building wheel for python-example (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Leo\Anaconda3\envs\pybindenv\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Leo\\AppData\\Local\\Temp\\pip-req-build-kagahwum\\setup.py'"'"'; __file__='"'"'C:\\Users\\Leo\\AppData\\Local\\Temp\\pip-req-build-kagahwum\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Leo\AppData\Local\Temp\pip-wheel-b07wghh7'
cwd: C:\Users\Leo\AppData\Local\Temp\pip-req-build-kagahwum\
Complete output (12 lines):
running bdist_wheel
running build
running build_ext
building 'python_example' extension
creating build
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DVERSION_INFO="0.0.1" -Ic:\users\leo\appdata\local\temp\pip-req-build-kagahwum\.eggs\pybind11-2.5.0-py3.8.egg\pybind11\include -IC:\Users\Leo\Anaconda3\envs\pybindenv\include -IC:\Users\Leo\Anaconda3\envs\pybindenv\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /EHsc /Tpsrc/main.cpp /Fobuild\temp.win-amd64-3.8\Release\src/main.obj /EHsc
main.cpp
src/main.cpp(36): error C2143: Syntaxfehler: Es fehlt ";" vor "Konstante"
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for python-example
Running setup.py clean for python-example
Failed to build python-example
Installing collected packages: python-example
Running setup.py install for python-example ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Leo\Anaconda3\envs\pybindenv\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Leo\\AppData\\Local\\Temp\\pip-req-build-kagahwum\\setup.py'"'"'; __file__='"'"'C:\\Users\\Leo\\AppData\\Local\\Temp\\pip-req-build-kagahwum\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Leo\AppData\Local\Temp\pip-record-uxtepnq8\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Leo\Anaconda3\envs\pybindenv\Include\python-example'
cwd: C:\Users\Leo\AppData\Local\Temp\pip-req-build-kagahwum\
Complete output (12 lines):
running install
running build
running build_ext
building 'python_example' extension
creating build
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DVERSION_INFO="0.0.1" -Ic:\users\leo\appdata\local\temp\pip-req-build-kagahwum\.eggs\pybind11-2.5.0-py3.8.egg\pybind11\include -IC:\Users\Leo\Anaconda3\envs\pybindenv\include -IC:\Users\Leo\Anaconda3\envs\pybindenv\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /EHsc /Tpsrc/main.cpp /Fobuild\temp.win-amd64-3.8\Release\src/main.obj /EHsc
main.cpp
src/main.cpp(36): error C2143: Syntaxfehler: Es fehlt ";" vor "Konstante"
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Leo\Anaconda3\envs\pybindenv\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Leo\\AppData\\Local\\Temp\\pip-req-build-kagahwum\\setup.py'"'"'; __file__='"'"'C:\\Users\\Leo\\AppData\\Local\\Temp\\pip-req-build-kagahwum\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Leo\AppData\Local\Temp\pip-record-uxtepnq8\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Leo\Anaconda3\envs\pybindenv\Include\python-example' Check the logs for full command output.
(pybindenv) C:\Users\Leo\Source\Repos\pybind>
Any idea what the issue is?
The thing is like this, I studied in the official documentation of pybind11, and then I saw the network connection of python_example, I clicked it, and found it was very good, I tried to use it in my own project: imitate the setup.py in it but I found an error reported.
The above said the type is wrong, but the official document and python_example are the same, so I downloaded python_example and found that it can be compiled and run. The comparison found that it is the reason of the compiler. As long as the compiler of python_example is used, it can be compiled. I don't Know why, can't you just use what he provides?
My system is windows.
If you need additional information, please ask me.
Let's say that I have a C++ class myclass with a method double loglik(const Eigen::MatrixXd& u)
. To expose this method in python, I have something like .def("loglik", &myclass::loglik, "computes the log-likelihood.", py::arg("u"))
, which works fine. In other words, when doing help(mymodule.myclass)
, I see something like loglik(self: mymodule.myclass, u: numpy.ndarray[float64[m, n]])
. However, when generating the documentation with Sphinx, the generated signature is loglik(self, u, n]])
.
Similarly, I have a method in C++ with some argument const Eigen::MatrixXd& u = Eigen::MatrixXd()
(i.e., the only difference is the "default"), which I expose in python using py::arg("u") = Eigen::MatrixXd()
, and again this works fine, but the generated signature for the documentation is myfunction(self, u, n]] = array[, dtype])
...
And it does not stop here. The same class has a constructor taking an argument const Eigen::MatrixXd& u
, which I expose in python using .def(py::init<const Eigen::MatrixXd&>(), "my constructor", py::arg("u"))
. In this case, the signature generated by Sphinx is __init__(self: mymodule.myclass, u: numpy.ndarray[float64[m, n]])
, so this one works as expected...
What am I missing here?
Hi , I believe this is related to
https://stackoverflow.com/questions/25192794/no-module-named-pip-req
PIP version but still its an going error.
pip install pybind
Python 3.7.3
pip 20.0.2
gcc 7.5.0 ubuntu 18.04
ERROR: Command errored out with exit status 1:
command: /home/paypaytr/anaconda3/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-u0ane2tw/pyangbind-brcd/setup.py'"'"'; __file__='"'"'/tmp/pip-install-u0ane2tw/pyangbind-brcd/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-u0ane2tw/pyangbind-brcd/pip-egg-info
cwd: /tmp/pip-install-u0ane2tw/pyangbind-brcd/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-u0ane2tw/pyangbind-brcd/setup.py", line 2, in <module>
from pip.req import parse_requirements
ModuleNotFoundError: No module named 'pip.req'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
On macOS, it is not possible to compile with -std=c++17
unless -mmacosx-version-min=10.14
. macOS 10.14 is Mojave, the latest version.
It would be best to select -std=c++14
on macOS since it is far more compatible with older versions. Alternately, perhaps something can be fixed in pybind11.h to improve compatibility.
If macOS version is -mmacosx-version-min=10.7
, error messages like:
pybind11/pybind11.h:1011:9: error: call to unavailable function 'operator delete': introduced in macOS 10.12
::operator delete(p, s);
^~~~~~~~~~~~~~~~~
If macOS 10.12 (or 10.13) is selected, as suggested, errors (perhaps unintended) still appear:
pybind11/pybind11.h:1009:9: error: no matching function for call to 'operator delete'
::operator delete(p, s, std::align_val_t(a));
^~~~~~~~~~~~~~~~~
This likely seems to be an issue on my end, but I haven't been able to figure this out, so hopefully someone on here has an idea. Here's the error I get when I clone the repo and run pip install --verbose .
.
For context, I'm in a 2019 16" macbook pro (Intel i7, so shouldn't be any ARM weirdness with m1 chips).
$ pip install --verbose .
Using pip 22.0.4 from /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip (python 3.10)
Processing /Users/mustafa/scratch/python_example
Running command pip subprocess to install build dependencies
Collecting setuptools>=42
Using cached setuptools-62.1.0-py3-none-any.whl (1.1 MB)
Collecting wheel
Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Collecting pybind11>=2.8.0
Using cached pybind11-2.9.2-py2.py3-none-any.whl (213 kB)
Installing collected packages: wheel, setuptools, pybind11
Successfully installed pybind11-2.9.2 setuptools-62.1.0 wheel-0.37.1
Installing build dependencies ... done
Running command Getting requirements to build wheel
running egg_info
writing python_example.egg-info/PKG-INFO
writing dependency_links to python_example.egg-info/dependency_links.txt
writing requirements to python_example.egg-info/requires.txt
writing top-level names to python_example.egg-info/top_level.txt
reading manifest file 'python_example.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'python_example.egg-info/SOURCES.txt'
Getting requirements to build wheel ... done
Running command Preparing metadata (pyproject.toml)
running dist_info
creating /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-modern-metadata-u0parlky/python_example.egg-info
writing /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-modern-metadata-u0parlky/python_example.egg-info/PKG-INFO
writing dependency_links to /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-modern-metadata-u0parlky/python_example.egg-info/dependency_links.txt
writing requirements to /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-modern-metadata-u0parlky/python_example.egg-info/requires.txt
writing top-level names to /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-modern-metadata-u0parlky/python_example.egg-info/top_level.txt
writing manifest file '/private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-modern-metadata-u0parlky/python_example.egg-info/SOURCES.txt'
reading manifest file '/private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-modern-metadata-u0parlky/python_example.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file '/private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-modern-metadata-u0parlky/python_example.egg-info/SOURCES.txt'
creating '/private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-modern-metadata-u0parlky/python_example-0.0.1.dist-info'
adding license file "LICENSE" (matched pattern "LICEN[CS]E*")
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: python-example
Running command Building wheel for python-example (pyproject.toml)
running bdist_wheel
running build
running build_ext
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c flagcheck.cpp -o flagcheck.o -std=c++17
building 'python_example' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -DVERSION_INFO=0.0.1 -I/private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include -I/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c src/main.cpp -o build/temp.macosx-10.9-universal2-cpython-310/src/main.o -std=c++17 -mmacosx-version-min=10.14 -fvisibility=hidden -g0 -stdlib=libc++
In file included from src/main.cpp:1:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/pybind11.h:13:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/detail/class.h:12:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/detail/../attr.h:13:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/cast.h:13:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/detail/common.h:213:
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/bin/../include/c++/v1/limits.h:58:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/11.0.0/include/limits.h:37:
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 src/main.cpp:1:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/pybind11.h:13:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/detail/class.h:12:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/detail/../attr.h:13:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/cast.h:13:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/detail/common.h:213:
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/bin/../include/c++/v1/limits.h:58:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/11.0.0/include/limits.h:37:
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 src/main.cpp:1:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/pybind11.h:13:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/detail/class.h:12:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/detail/../attr.h:13:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/cast.h:13:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/detail/common.h:213:
In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:25:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdio.h:108:
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 src/main.cpp:1:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/pybind11.h:13:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/detail/class.h:12:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/detail/../attr.h:13:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/cast.h:13:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/detail/common.h:213:
In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:25:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdio.h:108:
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'; did you mean '__int128_t'?
typedef __int64_t __darwin_blkcnt_t; /* total blocks */
^
note: '__int128_t' declared here
/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'; did you mean '__uint128_t'?
typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */
^
note: '__uint128_t' declared here
/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'; did you mean '__int128_t'?
typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */
^
note: '__int128_t' declared here
/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 src/main.cpp:1:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/pybind11.h:13:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/detail/class.h:12:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/detail/../attr.h:13:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/cast.h:13:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/detail/common.h:213:
In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:25:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdio.h:108:
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 src/main.cpp:1:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/pybind11.h:13:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/detail/class.h:12:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/detail/../attr.h:13:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/cast.h:13:
In file included from /private/var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/pip-build-env-aw96eob0/overlay/lib/python3.10/site-packages/pybind11/include/pybind11/detail/common.h:213:
In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:25:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdio.h:108:
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
error: subprocess-exited-with-error
× Building wheel for python-example (pyproject.toml) 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: /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/c8/00vmrkvs6r96cyth_mlr3dxr0000gn/T/tmpc19xvyla
cwd: /Users/mustafa/scratch/python_example
Building wheel for python-example (pyproject.toml) ... error
ERROR: Failed building wheel for python-example
Failed to build python-example
ERROR: Could not build wheels for python-example, which is required to install pyproject.toml-based projects
Here's what I have tried to do so far:
pip
and python
are up to date, and in sync.pip install --upgrade wheel setuptools
However, neither of these have seemed to help. I'm unsure if this is helpful or not, but I did clone the pybind11
repo itself and run the tests, they seem to run successfully.
I'm trying to install https://github.com/pybind/python_example on Ubuntu 16.04, and I receive:
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
None of Google's top suggestions rectified the issue.
openstack@prclnx04:~/python/pybind11$ pwd
/home/openstack/python/pybind11
openstack@prclnx04:~/python/pybind11$ git clone https://github.com/pybind/python_example.git
fatal: destination path 'python_example' already exists and is not an empty directory.
openstack@prclnx04:~/python/pybind11$ rm -rf ./python_example/
openstack@prclnx04:~/python/pybind11$ git clone https://github.com/pybind/python_example.git
Cloning into 'python_example'...
remote: Counting objects: 104, done.
remote: Total 104 (delta 0), reused 0 (delta 0), pack-reused 104
Receiving objects: 100% (104/104), 24.70 KiB | 0 bytes/s, done.
Resolving deltas: 100% (48/48), done.
Checking connectivity... done.
openstack@prclnx04:~/python/pybind11$ pip3 install ./python_example/
Processing ./python_example
Requirement already satisfied: pybind11>=1.7 in /usr/local/lib/python2.7/dist-packages/pybind11-2.1.dev0-py2.7.egg (from python-example==0.0.1)
Installing collected packages: python-example
Running setup.py install for python-example ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-zvc86btp-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-zjwl40ws-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
creating tmp
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c /tmp/tmpncjaa8z9.cpp -o tmp/tmpncjaa8z9.o -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c /tmp/tmp4z5uuskd.cpp -o tmp/tmp4z5uuskd.o -fvisibility=hidden
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
building 'python_example' extension
creating build
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/src
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/include/python3.5 -I/home/openstack/.local/include/python3.5m -I/usr/include/python3.5m -c src/main.cpp -o build/temp.linux-x86_64-3.5/src/main.o -DVERSION_INFO="0.0.1" -std=c++14 -fvisibility=hidden
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
src/main.cpp:1:31: fatal error: pybind11/pybind11.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-zvc86btp-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-zjwl40ws-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-zvc86btp-build/
openstack@prclnx04:~/python/pybind11$
Hello all,
I'm getting the attached errors when I run conda build
.
conda create -n bug_report python=3.8
conda activate bug_report
git clone https://github.com/pybind/python_example.git
cd python_example/conda.recipe
conda build .
No numpy version specified in conda_build_config.yaml. Falling back to default numpy value of 1.16
WARNING:conda_build.metadata:No numpy version specified in conda_build_config.yaml. Falling back to default numpy value of 1.16
Adding in variants from internal_defaults
INFO:conda_build.variants:Adding in variants from internal_defaults
Attempting to finalize metadata for python_example
INFO:conda_build.metadata:Attempting to finalize metadata for python_example
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/osx-64/repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/noarch/repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/osx-64/repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/noarch/repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/channeldata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/channeldata.json HTTP/1.1" 200 None
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
BUILD START: ['python_example-0.0.1-py39ha5a8b8e_0.tar.bz2']
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
## Package Plan ##
environment location: /Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p
The following NEW packages will be INSTALLED:
ca-certificates: 2022.4.26-hecd8cb5_0
certifi: 2022.5.18.1-py39hecd8cb5_0
libcxx: 12.0.0-h2f01273_0
libffi: 3.3-hb1e8313_2
ncurses: 6.3-hca72f7f_2
openssl: 1.1.1o-hca72f7f_0
pip: 21.2.4-py39hecd8cb5_0
pybind11: 2.9.1-py39hc29d2bd_0
python: 3.9.12-hdfd78df_1
readline: 8.1.2-hca72f7f_1
setuptools: 61.2.0-py39hecd8cb5_0
sqlite: 3.38.3-h707629a_0
tk: 8.6.12-h5d9f67b_0
tzdata: 2022a-hda174b7_0
wheel: 0.37.1-pyhd3eb1b0_0
xz: 5.2.5-hca72f7f_1
zlib: 1.2.12-h4dc903c_2
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
## Package Plan ##
environment location: /Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_build_env
The following NEW packages will be INSTALLED:
cctools_osx-64: 949.0.1-hc7db93f_23
clang: 12.0.0-hecd8cb5_2
clang-12: 12.0.0-default_hfcad0e5_2
clang_osx-64: 12.0.0-h7ad7729_2
clangxx: 12.0.0-default_hfcad0e5_2
clangxx_osx-64: 12.0.0-he0c6f94_2
compiler-rt: 12.0.0-hd87ff74_2
compiler-rt_osx-64: 12.0.0-hfb26b64_2
ld64_osx-64: 530-h70f3046_23
ldid: 2.1.2-h2d21305_2
libclang-cpp12: 12.0.0-default_hfcad0e5_2
libcxx: 12.0.0-h2f01273_0
libllvm12: 12.0.0-h9b2ccf5_3
llvm-tools: 12.0.0-h9b2ccf5_3
tapi: 1000.10.8-ha1b3eb9_0
zlib: 1.2.12-h4dc903c_2
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
Copying /Users/kejang/Local/small_projects/python_example to /Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/work/
source tree in: /Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/work
export PREFIX=/Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p
export BUILD_PREFIX=/Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_build_env
export SRC_DIR=/Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/work
INFO: activate_clang_osx-64.sh made the following environmental changes:
+AR=x86_64-apple-darwin13.4.0-ar
+AS=x86_64-apple-darwin13.4.0-as
+CC=x86_64-apple-darwin13.4.0-clang
+CC_FOR_BUILD=$BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-clang
+CFLAGS=-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/python_example-0.0.1 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix
+CHECKSYMS=x86_64-apple-darwin13.4.0-checksyms
+CLANG=x86_64-apple-darwin13.4.0-clang
+CMAKE_ARGS=-DCMAKE_AR=$BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-ar -DCMAKE_CXX_COMPILER_AR=$BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-ar -DCMAKE_C_COMPILER_AR=$BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-ar -DCMAKE_RANLIB=$BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-ranlib -DCMAKE_CXX_COMPILER_RANLIB=$BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-ranlib -DCMAKE_C_COMPILER_RANLIB=$BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-ranlib -DCMAKE_LINKER=$BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-ld -DCMAKE_STRIP=$BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-strip -DCMAKE_INSTALL_NAME_TOOL=$BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-install_name_tool -DCMAKE_LIBTOOL=$BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-libtool -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_INSTALL_LIBDIR=lib
+CMAKE_PREFIX_PATH=:$PREFIX
+CONDA_BUILD_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
+CONDA_TOOLCHAIN_BUILD=x86_64-apple-darwin13.4.0
+CONDA_TOOLCHAIN_HOST=x86_64-apple-darwin13.4.0
+CPPFLAGS=-D_FORTIFY_SOURCE=2 -isystem $PREFIX/include -mmacosx-version-min=10.9
+DEBUG_CFLAGS=-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -Og -g -Wall -Wextra -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/python_example-0.0.1 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix
+HOST=x86_64-apple-darwin13.4.0
+INDR=x86_64-apple-darwin13.4.0-indr
+INSTALL_NAME_TOOL=x86_64-apple-darwin13.4.0-install_name_tool
+LD=x86_64-apple-darwin13.4.0-ld
+LDFLAGS=-Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,$PREFIX/lib -L$PREFIX/lib
+LDFLAGS_LD=-pie -headerpad_max_install_names -dead_strip_dylibs -rpath $PREFIX/lib -L$PREFIX/lib
+LIBTOOL=x86_64-apple-darwin13.4.0-libtool
+LIPO=x86_64-apple-darwin13.4.0-lipo
+MESON_ARGS=--buildtype release --prefix=$PREFIX -Dlibdir=lib
+NM=x86_64-apple-darwin13.4.0-nm
+NMEDIT=x86_64-apple-darwin13.4.0-nmedit
+OBJC=x86_64-apple-darwin13.4.0-clang
+OBJC_FOR_BUILD=$BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-clang
+OTOOL=x86_64-apple-darwin13.4.0-otool
+PAGESTUFF=x86_64-apple-darwin13.4.0-pagestuff
+RANLIB=x86_64-apple-darwin13.4.0-ranlib
+REDO_PREBINDING=x86_64-apple-darwin13.4.0-redo_prebinding
+SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
+SEGEDIT=x86_64-apple-darwin13.4.0-segedit
+SEG_ADDR_TABLE=x86_64-apple-darwin13.4.0-seg_addr_table
+SEG_HACK=x86_64-apple-darwin13.4.0-seg_hack
+SIZE=x86_64-apple-darwin13.4.0-size
+STRINGS=x86_64-apple-darwin13.4.0-strings
+STRIP=x86_64-apple-darwin13.4.0-strip
+_CONDA_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_x86_64_apple_darwin13_4_0
+ac_cv_func_malloc_0_nonnull=yes
+ac_cv_func_realloc_0_nonnull=yes
+build_alias=x86_64-apple-darwin13.4.0
+host_alias=x86_64-apple-darwin13.4.0
INFO: activate_clangxx_osx-64.sh made the following environmental changes:
+CLANGXX=x86_64-apple-darwin13.4.0-clang++
+CXX=x86_64-apple-darwin13.4.0-clang++
+CXXFLAGS=-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/python_example-0.0.1 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix
+CXX_FOR_BUILD=$BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-clang++
+DEBUG_CXXFLAGS=-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -Og -g -Wall -Wextra -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/python_example-0.0.1 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix
Using pip 21.2.4 from $PREFIX/lib/python3.9/site-packages/pip (python 3.9)
Non-user install because user site-packages disabled
Ignoring indexes: https://pypi.org/simple
Created temporary directory: /private/tmp/pip-ephem-wheel-cache-ktnwkn09
Created temporary directory: /private/tmp/pip-req-tracker-w6r1e96_
Initialized build tracking at /private/tmp/pip-req-tracker-w6r1e96_
Created build tracker: /private/tmp/pip-req-tracker-w6r1e96_
Entered build tracker: /private/tmp/pip-req-tracker-w6r1e96_
Created temporary directory: /private/tmp/pip-install-3a_80d5s
Processing $SRC_DIR
Created temporary directory: /private/tmp/pip-req-build-5ynustjn
DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
Added file://$SRC_DIR to build tracker '/private/tmp/pip-req-tracker-w6r1e96_'
Created temporary directory: /private/tmp/pip-modern-metadata-vjdahyhz
Preparing wheel metadata: started
Running command /Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/bin/python /Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp4ukppx24
running dist_info
creating /private/tmp/pip-modern-metadata-vjdahyhz/python_example.egg-info
writing /private/tmp/pip-modern-metadata-vjdahyhz/python_example.egg-info/PKG-INFO
writing dependency_links to /private/tmp/pip-modern-metadata-vjdahyhz/python_example.egg-info/dependency_links.txt
writing requirements to /private/tmp/pip-modern-metadata-vjdahyhz/python_example.egg-info/requires.txt
writing top-level names to /private/tmp/pip-modern-metadata-vjdahyhz/python_example.egg-info/top_level.txt
writing manifest file '/private/tmp/pip-modern-metadata-vjdahyhz/python_example.egg-info/SOURCES.txt'
reading manifest file '/private/tmp/pip-modern-metadata-vjdahyhz/python_example.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file '/private/tmp/pip-modern-metadata-vjdahyhz/python_example.egg-info/SOURCES.txt'
creating '/private/tmp/pip-modern-metadata-vjdahyhz/python_example.dist-info'
adding license file "LICENSE" (matched pattern "LICEN[CS]E*")
Preparing wheel metadata: finished with status 'done'
Source in /private/tmp/pip-req-build-5ynustjn has version 0.0.1, which satisfies requirement python-example==0.0.1 from file://$SRC_DIR
Removed python-example==0.0.1 from file://$SRC_DIR from build tracker '/private/tmp/pip-req-tracker-w6r1e96_'
Created temporary directory: /private/tmp/pip-unpack-u2bof02c
Building wheels for collected packages: python-example
Created temporary directory: /private/tmp/pip-wheel-jyg0v0kw
Destination directory: /private/tmp/pip-wheel-jyg0v0kw
Building wheel for python-example (PEP 517): started
Running command /Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/bin/python /Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpoz_uuaku
running bdist_wheel
running build
running build_ext
x86_64-apple-darwin13.4.0-clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/include -arch x86_64 -I/Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/include -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/include -arch x86_64 -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/include -fdebug-prefix-map=/Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/work=/usr/local/src/conda/python_example-0.0.1 -fdebug-prefix-map=/Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p=/usr/local/src/conda-prefix -D_FORTIFY_SOURCE=2 -isystem /Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/include -mmacosx-version-min=10.9 -I/Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/include/python3.9 -c flagcheck.cpp -o flagcheck.o -std=c++17
building 'python_example' extension
creating build/temp.macosx-10.9-x86_64-3.9
creating build/temp.macosx-10.9-x86_64-3.9/src
x86_64-apple-darwin13.4.0-clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/include -arch x86_64 -I/Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/include -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/include -arch x86_64 -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/include -fdebug-prefix-map=/Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/work=/usr/local/src/conda/python_example-0.0.1 -fdebug-prefix-map=/Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p=/usr/local/src/conda-prefix -D_FORTIFY_SOURCE=2 -isystem /Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/include -mmacosx-version-min=10.9 -DVERSION_INFO=0.0.1 -I/Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib/python3.9/site-packages/pybind11/include -I/Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/include/python3.9 -c src/main.cpp -o build/temp.macosx-10.9-x86_64-3.9/src/main.o -std=c++17 -fvisibility=hidden -g0 -stdlib=libc++
creating build/lib.macosx-10.9-x86_64-3.9
x86_64-apple-darwin13.4.0-clang++ -bundle -undefined dynamic_lookup -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib -L/Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib -L/Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib -L/Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib -L/Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/include -fdebug-prefix-map=/Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/work=/usr/local/src/conda/python_example-0.0.1 -fdebug-prefix-map=/Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p=/usr/local/src/conda-prefix -D_FORTIFY_SOURCE=2 -isystem /Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/include -mmacosx-version-min=10.9 build/temp.macosx-10.9-x86_64-3.9/src/main.o -o build/lib.macosx-10.9-x86_64-3.9/python_example.cpython-39-darwin.so -stdlib=libc++
ld: warning: -pie being ignored. It is only used when linking a main executable
ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd' for architecture x86_64
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/_build_env/bin/x86_64-apple-darwin13.4.0-clang++' failed with exit code 1
Building wheel for python-example (PEP 517): finished with status 'error'
ERROR: Failed building wheel for python-example
Failed to build python-example
ERROR: Could not build wheels for python-example which use PEP 517 and cannot be installed directly
Exception information:
Traceback (most recent call last):
File "$PREFIX/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 173, in _main
status = self.run(options, args)
File "$PREFIX/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 203, in wrapper
return func(self, options, args)
File "$PREFIX/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 357, in run
raise InstallationError(
pip._internal.exceptions.InstallationError: Could not build wheels for python-example which use PEP 517 and cannot be installed directly
Removed build tracker: '/private/tmp/pip-req-tracker-w6r1e96_'
Traceback (most recent call last):
File "/Users/kejang/opt/anaconda3/bin/conda-build", line 11, in <module>
sys.exit(main())
File "/Users/kejang/opt/anaconda3/lib/python3.9/site-packages/conda_build/cli/main_build.py", line 488, in main
execute(sys.argv[1:])
File "/Users/kejang/opt/anaconda3/lib/python3.9/site-packages/conda_build/cli/main_build.py", line 477, in execute
outputs = api.build(args.recipe, post=args.post, test_run_post=args.test_run_post,
File "/Users/kejang/opt/anaconda3/lib/python3.9/site-packages/conda_build/api.py", line 186, in build
return build_tree(
File "/Users/kejang/opt/anaconda3/lib/python3.9/site-packages/conda_build/build.py", line 3088, in build_tree
packages_from_this = build(metadata, stats,
File "/Users/kejang/opt/anaconda3/lib/python3.9/site-packages/conda_build/build.py", line 2211, in build
utils.check_call_env(cmd, env=env, rewrite_stdout_env=rewrite_env,
File "/Users/kejang/opt/anaconda3/lib/python3.9/site-packages/conda_build/utils.py", line 411, in check_call_env
return _func_defaulting_env_to_os_environ('call', *popenargs, **kwargs)
File "/Users/kejang/opt/anaconda3/lib/python3.9/site-packages/conda_build/utils.py", line 391, in _func_defaulting_env_to_os_environ
raise subprocess.CalledProcessError(proc.returncode, _args)
subprocess.CalledProcessError: Command '['/bin/bash', '-o', 'errexit', '/Users/kejang/opt/anaconda3/conda-bld/python_example_1655698551452/work/conda_build.sh']' returned non-zero exit status 1.
Trying to adapt this to a project and add -fopenmp
, I found that I get warnings about ignoring #pragma omp parallel for
. Inspecting the actual compiler call, -fopenmp
doesn't show up even though the extra_compile_args=['-fopenmp']
is given to the Extension
.
Workaround: in BuildExt.build_extensions
, add:
opts.append('-fopenmp')
A better way to do this might be to note use a custom build_ext
class at all, but instead just do all the platform/compiler checking logic at the top level and passing the results in to extra_compile_args
.
I can use python setup.py install
to install on Linux or macOS, but it will report an error on Windows. And this kind of error will only happen if you add a directory structure to the cpp source code, like the following pybind_example/backend/ops.cc
(if it is such a structure pybind_example/ops.cc
, you can successful compilation).
The following is the error message:
LINK : error LNK2001: unresolved external symbol PyInit_pybind_example/backend/ops
build\temp.win-amd64-3.7\Release\pybind_example/backend\ops.cp37-win_amd64.lib : fatal error LNK1120: 1 unresolved externals
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\link.exe' failed with exit status 1120
I have been confused for three days, and the same error appears when using skbuild
. I am a newbie in windows development.
If I have a module built with pybind as sub-module how would my already constructed setup.py incorporate this? For example, my package is structured like this.
\--package_home
setup.py
\--base_package
__init__.py
a1.py
a2.py
\--sub_package
__init__.py
[pybind .so module would go here]
b1.py
When trying to install the package in a VM that runs Jupyter , I get:
Building wheels for collected packages: python-example
Building wheel for python-example (pyproject.toml) ... error
ERROR: Command errored out with exit status 1:
command: /opt/conda/bin/python3.9 /opt/conda/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp9_ynf75e
cwd: /tmp/pip-install-m83247_q/python-example_7e361d0b50f14aa5b1656c0b195516e2
Complete output (63 lines):
running bdist_wheel
running build
running build_ext
gcc -pthread -B /opt/conda/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/conda/include -fPIC -O2 -isystem /opt/conda/include -fPIC -I/opt/conda/include/python3.9 -c flagcheck.cpp -o flagcheck.o -std=c++17
gcc: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory
compilation terminated.
gcc -pthread -B /opt/conda/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/conda/include -fPIC -O2 -isystem /opt/conda/include -fPIC -I/opt/conda/include/python3.9 -c flagcheck.cpp -o flagcheck.o -std=c++14
gcc: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory
compilation terminated.
gcc -pthread -B /opt/conda/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/conda/include -fPIC -O2 -isystem /opt/conda/include -fPIC -I/opt/conda/include/python3.9 -c flagcheck.cpp -o flagcheck.o -std=c++11
gcc: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory
compilation terminated.
Traceback (most recent call last):
File "/opt/conda/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/opt/conda/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/opt/conda/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/tmp/pip-build-env-2d19eif2/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 413, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "/tmp/pip-build-env-2d19eif2/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 398, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-2d19eif2/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 335, in run_setup
exec(code, locals())
File "<string>", line 27, in <module>
File "/tmp/pip-build-env-2d19eif2/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/tmp/pip-build-env-2d19eif2/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/tmp/pip-build-env-2d19eif2/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/tmp/pip-build-env-2d19eif2/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/tmp/pip-build-env-2d19eif2/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1208, in run_command
super().run_command(command)
File "/tmp/pip-build-env-2d19eif2/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-2d19eif2/normal/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 325, in run
self.run_command("build")
File "/tmp/pip-build-env-2d19eif2/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-2d19eif2/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1208, in run_command
super().run_command(command)
File "/tmp/pip-build-env-2d19eif2/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-2d19eif2/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 132, in run
self.run_command(cmd_name)
File "/tmp/pip-build-env-2d19eif2/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-2d19eif2/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1208, in run_command
super().run_command(command)
File "/tmp/pip-build-env-2d19eif2/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-2d19eif2/overlay/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 84, in run
_build_ext.run(self)
File "/tmp/pip-build-env-2d19eif2/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
self.build_extensions()
File "/tmp/pip-build-env-2d19eif2/overlay/lib/python3.9/site-packages/pybind11/setup_helpers.py", line 288, in build_extensions
ext.cxx_std = auto_cpp_level(self.compiler)
File "/tmp/pip-build-env-2d19eif2/overlay/lib/python3.9/site-packages/pybind11/setup_helpers.py", line 271, in auto_cpp_level
raise RuntimeError(msg)
RuntimeError: Unsupported compiler -- at least C++11 support is needed!
----------------------------------------
ERROR: Failed building wheel for python-example
Failed to build python-example
ERROR: Could not build wheels for python-example, which is required to install pyproject.toml-based projects
@wjakob @dean0x7d @jmabille
In projects using pybind11 that are pure C++, you end up with having to specify the package version number both
setup.py
to specify the version number for the python module.__version__
attribute, provided by the c++ code.In order to not have to change the version number in two locations at each release, the __version__
module attribute is computed based on a macro set in a _version.hpp
header.
The setup.py overrides that file to set the __version__
string to the one specified in setup.py
.
with open('./include/_version.hpp', 'w') as f:
f.write('''
#ifndef PYTHON_EXAMPLE_VERSION_HP
#define PYTHON_EXAMPLE_VERSION_HPP
#define PYTHON_EXAMPLE_VERSION "%s"
#endif
''' % __version__)
and _version.hpp
is in the .gitignore
so that these changes don't get checked in.
Do you think of a better way to do this? Should we include this method in the example projects?
I just played a little with the test project you kindly provided. I am currently facing the challenge of adapting the setup.py
file for my project turbodbc to reflect my recent move from Boost.Python to pyodbc11 (thanks for that as well).
This example here (as well as my project) features pybind11
in the install_requires
section. This seems to be sufficient when installing from git with pip install /path/to/source
.
Now consider the situation where I want to create a source distribution with python setup.py sdist
for later upload to pypi. Subsequent installation with pip install python-example.0.0.1.tar.gz
yields error messages (output edited for brevity):
Processing ./python_example/dist/python_example-0.0.1.tar.gz
Collecting pybind11>=1.7 (from python-example==0.0.1)
...
Building wheels for collected packages: python-example
Running setup.py bdist_wheel for python-example ... error
...
building 'python_example' extension
Traceback (most recent call last):
...
File "/tmp/pip-0aU382-build/setup.py", line 20, in __str__
import pybind11
ImportError: No module named pybind11
----------------------------------------
Failed building wheel for python-example
Running setup.py clean for python-example
Failed to build python-example
Installing collected packages: pybind11, python-example
Running setup.py install for python-example ... done
Successfully installed pybind11-1.8.1 python-example-0.0.1
Apparently, when building from a source distribution, pip install
tries to build a wheel first. While building the wheel, the install requirements seem to be ignored. Even though this stage fails, pip install
continues with a regular setup.py install
afterwards that succeeds.
I have tried to resolve the issue by adding setup_requires=['pybind11>=1.7.0']
to setup.py
. Indeed, the error message changes: Instead of a Python ImportError
while building the wheel, I observe a compiler error instead, also while building the wheel:
src/main.cpp:1:31: fatal error: pybind11/pybind11.h: No such file or directory
compilation terminated.
error: command 'g++-5' failed with exit status 1
----------------------------------------
Failed building wheel for python-example
Again, the overall installation completes afterwards.
It would be great if you had some more ideas or advice. In the interest of a clean build output, I would otherwise consider packing the pybind header files (and License, of course) in my source distribution and remove the dependency to the pybind package.
Trying to build python-example on a machine where pybind11 is not installed yet, it does install pybind11 automatically and provides the right path to find the headers of an installed pybind11 (I patched setup.py to print them with "INCLUDE:", don't be surprised by them), except that the headers are not there yet when the compiler runs, setup_requires only put them in some /tmp/pip-install-*. After the error, they do move to their expected place ("Installing collected packages: pybind11"), but it is too late. Running the same command when pybind11 is already installed (for instance by the previous failed attempt) works fine.
Unless you can convince pip to really install packages before setup, I think it means the logic used to give the path to the headers needs some refinement.
/tmp $ pip3 install ./python_example Processing ./python_example Collecting pybind11>=2.4 (from python-example==0.0.1) Using cached https://files.pythonhosted.org/packages/4b/4d/ae1c4d8e8b139afa9682054dd42df3b0e3b5c1731287933021b9fd7e9cc4/pybind11-2.4.3-py2.py3-none-any.whl Building wheels for collected packages: python-example Running setup.py bdist_wheel for python-example ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-req-build-bi9gmv5j/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-sqdhu1u6 --python-tag cp37: running bdist_wheel running build running build_ext creating tmp x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c /tmp/tmp41p70shh.cpp -o tmp/tmp41p70shh.o -std=c++17 x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c /tmp/tmp5oeoq218.cpp -o tmp/tmp5oeoq218.o -fvisibility=hidden building 'python_example' extension INCLUDE: /usr/local/include/python3.7 INCLUDE: /home/glisse/.local/include/python3.7m creating build creating build/temp.linux-x86_64-3.7 creating build/temp.linux-x86_64-3.7/src x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/include/python3.7 -I/home/glisse/.local/include/python3.7m -I/usr/include/python3.7m -c src/main.cpp -o build/temp.linux-x86_64-3.7/src/main.o -DVERSION_INFO="0.0.1" -std=c++17 -fvisibility=hidden src/main.cpp:1:10: fatal error: pybind11/pybind11.h: No such file or directory 1 | #include | ^~~~~~~~~~~~~~~~~~~~~ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 ---------------------------------------- Failed building wheel for python-example Running setup.py clean for python-example Failed to build python-example Installing collected packages: pybind11, python-example Running setup.py install for python-example ... done Successfully installed pybind11-2.4.3 python-example-0.0.1
So pybind11 1.5 now ships with a pybind11.get_include()
method. I am wondering if/how to call it in pbtest
's setup.py
file.
If the pybind
package does not yet exist, setuptools.py
will install it. However, I don't think it's safe to assume that it exists already in https://github.com/pybind/pbtest/blob/master/setup.py#L14.
Thoughts?
Thanks,
Wenzel
Unsure the correct place to ask this, if an issue is not a proper venue kindly point me to a better one and I will ask the question there.
I'm trying to wrap a C++ class that in turn a wrapper over a 3rd party library. The library supplies a single .so file that I can link against. I have everything working but can't figure out how to package my code in a way so that I can deploy it as a wheel and have it work correctly in a virtualenv without the user having to install this 3rd party library's .so file. I know that I can copy the .so file into the target computer's /usr/lib
and then things work fine but I'm wondering if there is a better solution.
I have a base (pure-abstract) interface that is extended by another (pure abstract) interface.
Then i have an implementation of the base interface and a implementation of the extended interface that derives the extended interface and the base implementation via virtual inheritance (diamond)
Now if i return a reference of type InterfaceExtened i can correctly use it.
If i however delete the object that is being referenced on the c++ side, then i get an error during program exit. I do not get such an error when doing the same using InterfaceBase.
I create file pybind11bug.cpp:
#include <pybind11/pybind11.h>
#include <memory>
#include <iostream>
class InterfaceBase {
public:
virtual ~InterfaceBase() = default;
virtual void foo() = 0;
};
class InterfaceExtended: public virtual InterfaceBase {
public:
virtual ~InterfaceExtended() = default;
virtual void bar() = 0;
};
class ImplementationBase: public virtual InterfaceBase {
public:
virtual void foo() { std::cout << "foo" << std::endl;};
};
class ImplementationExtended: public ImplementationBase, public InterfaceExtended {
public:
virtual void bar() { std::cout << "bar" << std::endl; };
};
class Helper {
public:
InterfaceBase& createBaseInstance() {
instanceBase.reset(new ImplementationBase());
return *instanceBase;
}
void deletebaseInstance() {
instanceBase.reset();
}
InterfaceExtended& createExtendedInstance() {
instanceExt.reset(new ImplementationExtended());
return *instanceExt;
}
void deleteBaseInstance() {
instanceBase.reset();
}
void deleteExtendedInstance() {
instanceExt.reset();
}
private:
std::unique_ptr<InterfaceBase> instanceBase;
std::unique_ptr<InterfaceExtended> instanceExt;
};
namespace py = pybind11;
PYBIND11_MODULE(example, m) {
py::class_<InterfaceBase>(m, "InterfaceBase")
.def("foo", &InterfaceBase::foo);
py::class_<InterfaceExtended, InterfaceBase>(m, "InterfaceExtended", py::multiple_inheritance())
.def("bar", &InterfaceExtended::bar);
py::class_<Helper>(m, "Helper")
.def(py::init())
.def("create_base_instance", &Helper::createBaseInstance, py::return_value_policy::reference)
.def("create_extended_instance", &Helper::createExtendedInstance, py::return_value_policy::reference)
.def("delete_base_instance", &Helper::deleteBaseInstance)
.def("delete_extended_instance", &Helper::deleteExtendedInstance);
}
I compile with:
c++ -O3 -Wall -shared -std=c++11 -fPIC `python3 -m pybind11 --includes` pybind11bug.cpp -o example`python3-config --extension-suffix`
Then i run:
import example
helper = example.Helper()
base = helper.create_base_instance()
ext = helper.create_extended_instance()
ext.foo()
ext.bar()
# deleting a return_value_policy::reference on c++ side
# for the base (non-virtual inheritance class) is fine
helper.delete_base_instance()
# deleting a return_value_policy::reference on c++ side
# for the extended (virtual inheritance class) generates a segfault on cleanup
# (when commenting out the next line there is no segfault)
helper.delete_extended_instance()
I get this error when running pip install . on python_example.
[Config]
I tried to run setup.py with MinGW instead of Visual Studio MSVC
python setup.py build --compiler=mingw32
I get the following error:
ValueError: Unknown MS Compiler version 1916
Is there any way to make it work with MinGW?
Note that a manual compilation with MinGW works perfectly running:
g++ -static -shared -std=c++11 -DMS_WIN64 -fPIC -I C:\...\Python\Python38\Lib\site-packages\pybind11\include -I C:\ ... \Python\Python38\include -L C:\ ... \Python\Python38\libs src\main.cpp -o python_example.pyd -lPython38
but I cannot manage to make it to work with setuptools.
There are a few compilation flags that make a huge difference with respect to unnecessary bloat in the resulting binaries when compiling stuff using pybind11. In particular, that is -fvisibility=hidden
on GCC/Clang (>50% difference).
It's also good to turn on C++14 support if possible, since that pushes some precomputation to the compile phase. In CMake, I would just do:
if (HAS_CPP14_FLAG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
elseif (HAS_CPP11_FLAG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
else()
message(FATAL_ERROR "Unsupported compiler -- at least C++11 support is needed!")
endif()
Is it possible to enable these flags here as well?
I believe that's how to interpret the error below:
~/Documents/GarNet(master*) » pip install pcst_fast
Collecting pcst_fast
Downloading pcst_fast-1.0.0.tar.gz
Collecting pybind11>=1.7 (from pcst_fast)
Downloading pybind11-2.1.0-py2.py3-none-any.whl (109kB)
100% |████████████████████████████████| 112kB 4.4MB/s
Installing collected packages: pybind11, pcst-fast
Running setup.py install for pcst-fast ... error
...
src/pcst_fast_pybind.cc:9:10: fatal error: 'pcst_fast.h' file not found
#include "pcst_fast.h"
^
1 error generated.
error: command 'clang' failed with exit status 1
I have a (mostly) working build using an older/more conventional pybind11 setup.py but when I try to follow this example I get an undefined symbol error when loading the module, eg, to run tests, etc. Neither my setup.py nor the external library have anything to do with cmake, so it would be really helpful if you had an example of such an extension build using the Pybind11Extension
shown in this example.
Hi! Thanks so much for this very useful example. I've been studying it as I've been trying to understand the best way to set up wheels for a project.
I see that pybind11 is in both install_requires
and setup_requires
. When installing a source distribution through pip, pip will first install pybind11, so the headers are available and the build works.
If it's removed from install_requires
, I need to install pybind11
and my project together. Otherwise I get errors like this:
bindings.cc:1:10: fatal error: 'pybind11/pybind11.h' file not found
#include <pybind11/pybind11.h>
^~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
However there's a downside. If I build a wheel, when it's later installed the install_requires
take effect, and pybind11 is installed on the deployment machine. As far as I can tell this is completely unnecessary as the built extensions do not have a runtime dependency on pybind11.
What I would like is these two behaviors:
This probably is not a pybind issue; it's more of a setuptools issue as it relates to pybind11, though this seems like a good place to develop the recipe.
One idea is to remove pybind11 from install_requires and add some code that runs on build_ext to programmatically install pybind11 (when a valid version isn't already available).
It would be really convenient if this repo and the other examples could be converted into Github template repositories.
pip version 10.0 doesn't have a pip.locations
. So pybind11.get_include()
just returns 'include'
after the ImportError.
Workaround for now is to require pip version 9.0.3. But ideal if you could figure out what the right pip function to call is when pip.__version__ > '10.0'
.
Hi,
I am trying to build python package with a reference eigen but I get following error that it is not possible to find eigen:
How setuptools knows where to find linraries and includes?
My repository that I want to build is here with setup file:
https://github.com/ibois-epfl/compas_wood
Hi Sylvain,
Dean Moldovan contributed a new repository named cmake_example
. I was considering to rename this into something consistent, e.g. pip_example
or python_example
. Any thoughts on this?
Thanks,
Wenzel
Hi,
It is such a simple provided example. Could you please provide some more sophisticated examples such as how to bind modules with external third-party dynamic/static libraries (.so/.a)? Is there any requirement on the third-party libraries?
This example does not explain how to deal with the .h file. When I package it according to the example, I find that the wheel file is normal, but the .h file is not packaged in the source code of tar.gz. The code is below.
extension_modules = [
Pybind11Extension(
'classicML/backend/cc/ops',
sorted(glob('classicML/backend/cc/*.cc')),
include_dirs=[
'/usr/local/include/eigen3', # /path/to/eigen3/download
],
language='c++',
)
]
When I realized this problem, I modified the source code to the following.
sorted(glob('classicML/backend/cc/*[cc.h]'))
Runpython3 setup.py sdist bdist_wheel
. The .h file can be packaged into the source code, and there is a problem with generating the wheel file.😭
Creating tar archive
removing 'classicML-0.5' (and everything under it)
running bdist_wheel
running build
running build_py
running build_ext
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c flagcheck.cpp -o flagcheck.o -std=c++17
building 'classicML/backend/cc/ops' extension
error: unknown file type '.h' (from 'classicML/backend/cc/matrix_op.h')
I just started learning to use pybind. I don’t know if this is a problem with setuptools or pybind.
On OS X, the -stdlib and min os x version passed to CPPFLAGS here:
https://github.com/pybind/python_example/blob/master/setup.py#L75
should also be added to the equivalent to LDFLAGS on Unix systems. I believe that is extra_linker_args?
If this is not done, odd symptoms happen like exceptions not propagating from C++ to Python as expected, etc.
I'm getting this error trying to use a C++ module that calls a third-party library to return a boolean value. If I simply return true all works well. But when I call the thid-party function I get the ImportError.
#include <RecFusion.h>
#include <pybind11/pybind11.h>
using namespace RecFusion;
bool isValidLicense() {
return RecFusionSDK::setLicenseFile("License.dat");
//return true;
}
namespace py = pybind11;
PYBIND11_MODULE(recfusionbind, m) {
m.def("isValidLicense", &isValidLicense, R"pbdoc(
Check if there is a valid license file.
)pbdoc");
#ifdef VERSION_INFO
m.attr("__version__") = VERSION_INFO;
#else
m.attr("__version__") = "dev";
#endif
}
Here is the header of setLicenseFile:
static bool setLicenseFile (const char *filename)
I'm using VS 2019. Any help would be greatly appreciated.
Unfortunately the setup process has started to fail. Unsure what the cause of this is, it could to do with how setup.py
imports pybind11.
Python 3.6.5 (default, Apr 1 2018, 05:46:30)
[GCC 7.3.0] on linux
Name: pip
Version: 10.0.1
Distributor ID: Ubuntu
Description: Ubuntu 18.04 LTS
Release: 18.04
Codename: bionic
$ pip install git+https://github.com/pybind/python_example
Collecting git+https://github.com/pybind/python_example
Cloning https://github.com/pybind/python_example to /tmp/pip-req-build-_2f417pj
Collecting pybind11>=2.2 (from python-example==0.0.1)
Using cached https://files.pythonhosted.org/packages/12/90/0f92a575dc60c8fba6d0c91d6b45abdb1058da9ebed40400cbcfad2ac0a7/pybind11-2.2.3-py2.py3-none-any.whl
Building wheels for collected packages: python-example
Running setup.py bdist_wheel for python-example ... error
Complete output from command /home/dom/env/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-req-build-_2f417pj/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/pip-wheel-f4j10o78 --python-tag cp36:
running bdist_wheel
running build
running build_ext
creating tmp
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-EKG1lX/python3.6-3.6.5=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -I/home/dom/env/include/python3.6m -c /tmp/tmpfcwb_k_e.cpp -o tmp/tmpfcwb_k_e.o -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-EKG1lX/python3.6-3.6.5=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -I/home/dom/env/include/python3.6m -c /tmp/tmpggfsh938.cpp -o tmp/tmpggfsh938.o -fvisibility=hidden
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
building 'python_example' extension
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-req-build-_2f417pj/setup.py", line 103, in
zip_safe=False,
File "/home/dom/env/lib/python3.6/site-packages/setuptools/init.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/dom/env/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 202, in run
self.run_command('build')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/dom/env/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 78, in run
_build_ext.run(self)
File "/usr/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/tmp/pip-req-build-_2f417pj/setup.py", line 90, in build_extensions
build_ext.build_extensions(self)
File "/usr/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/usr/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/home/dom/env/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 199, in build_extension
_build_ext.build_extension(self, ext)
File "/usr/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
depends=ext.depends)
File "/usr/lib/python3.6/distutils/ccompiler.py", line 566, in compile
depends, extra_postargs)
File "/usr/lib/python3.6/distutils/ccompiler.py", line 341, in _setup_compile
pp_opts = gen_preprocess_options(macros, incdirs)
File "/usr/lib/python3.6/distutils/ccompiler.py", line 1075, in gen_preprocess_options
pp_opts.append("-I%s" % dir)
File "/tmp/pip-req-build-_2f417pj/setup.py", line 20, in str
import pybind11
ModuleNotFoundError: No module named 'pybind11'
Failed building wheel for python-example
Running setup.py clean for python-example
Failed to build python-example
Installing collected packages: pybind11, python-example
Running setup.py install for python-example ... done
Successfully installed pybind11-2.2.3 python-example-0.0.1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.