installing numpy using python3.2 Mac OSX Lion - numpy

Trying to build numpy on OSX Lion.
I followed the instructions from this post, using a replacing 10.6 with 10.7 for LDSHARED. However when I run setup.py it seems like it is still using 10.6??
how do i fix this?
eric#system-process-2 /Users/Eric/Desktop/numpy-1.7.0b2$ export CC=clang
eric#system-process-2 /Users/Eric/Desktop/numpy-1.7.0b2$ export CXX=clang
eric#system-process-2 /Users/Eric/Desktop/numpy-1.7.0b2$ export FFLAGS=-ff2c
eric#system-process-2 /Users/Eric/Desktop/numpy-1.7.0b2$ export LDSHARED='clang -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -g'
eric#system-process-2 /Users/Eric/Desktop/numpy-1.7.0b2$ python3.2 setup.py build
Converting to Python3 via 2to3...
Running from numpy source directory.
non-existing path in 'numpy/distutils': 'site.cfg'
F2PY Version 2
blas_opt_info:
FOUND:
extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
define_macros = [('NO_ATLAS_INFO', 3)]
extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']
non-existing path in 'numpy/lib': 'benchmarks'
lapack_opt_info:
FOUND:
extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
define_macros = [('NO_ATLAS_INFO', 3)]
extra_compile_args = ['-msse3']
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building py_modules sources
building library "npymath" sources
customize Gnu95FCompiler
Found executable /usr/local/bin/gfortran
Could not locate executable clang -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -g
customize Gnu95FCompiler
customize Gnu95FCompiler using config
C compiler: clang -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk
compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m -c'
clang: _configtest.c
clang _configtest.o -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
C compiler: clang -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk
compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m -c'
clang: _configtest.c
_configtest.c:1:5: warning: incompatible redeclaration of library function 'exp'
int exp (void);
^
_configtest.c:1:5: note: 'exp' is a builtin with type 'double (double)'
1 warning generated.
_configtest.c:1:5: warning: incompatible redeclaration of library function 'exp'
int exp (void);
^
_configtest.c:1:5: note: 'exp' is a builtin with type 'double (double)'
1 warning generated.
clang _configtest.o -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
building library "npysort" sources
building extension "numpy.core._dummy" sources
Generating build/src.macosx-10.6-intel-3.2/numpy/core/include/numpy/config.h
C compiler: clang -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk
compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m -c'
clang: _configtest.c
In file included from _configtest.c:1:
/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/Python.h:25:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^
1 error generated.
In file included from _configtest.c:1:
/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/Python.h:25:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^
1 error generated.
failure.
removing: _configtest.c _configtest.o
Traceback (most recent call last):
File "setup.py", line 214, in <module>
setup_package()
File "setup.py", line 207, in setup_package
configuration=configuration )
File "/Users/eric/Desktop/numpy-1.7.0b2/build/py3k/numpy/distutils/core.py", line 186, in setup
return old_setup(**new_attr)
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/dist.py", line 917, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/dist.py", line 936, in run_command
cmd_obj.run()
File "/Users/eric/Desktop/numpy-1.7.0b2/build/py3k/numpy/distutils/command/build.py", line 37, in run
old_build.run(self)
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/command/build.py", line 126, in run
self.run_command(cmd_name)
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/dist.py", line 936, in run_command
cmd_obj.run()
File "/Users/eric/Desktop/numpy-1.7.0b2/build/py3k/numpy/distutils/command/build_src.py", line 152, in run
self.build_sources()
File "/Users/eric/Desktop/numpy-1.7.0b2/build/py3k/numpy/distutils/command/build_src.py", line 169, in build_sources
self.build_extension_sources(ext)
File "/Users/eric/Desktop/numpy-1.7.0b2/build/py3k/numpy/distutils/command/build_src.py", line 328, in build_extension_sources
sources = self.generate_sources(sources, ext)
File "/Users/eric/Desktop/numpy-1.7.0b2/build/py3k/numpy/distutils/command/build_src.py", line 385, in generate_sources
source = func(extension, build_dir)
File "numpy/core/setup.py", line 410, in generate_config_h
moredefs, ignored = cocache.check_types(config_cmd, ext, build_dir)
File "numpy/core/setup.py", line 41, in check_types
out = check_types(*a, **kw)
File "numpy/core/setup.py", line 271, in check_types
"Cannot compile 'Python.h'. Perhaps you need to "\
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.

Met similar problem, and the following command worked for me:
export CFLAGS="-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk" tox

Related

Trouble installing build dependencies

Tried following installation guide, got this issue.
Python 3.11, updated pip and numpy.
Tried to focus on the not available aspect of the error, but again all information tells to reinstall numpy which I have done many a times.
PS C:\WINDOWS\system32> pip install -r C:\Users\Rmuij\OneDrive\Bureaublad\SkyblockSniper-main\SkyblockSniper-main\requirements.txt pip install -r C:\Users\Rmuij\OneDrive\Bureaublad\SkyblockSniper-main\SkyblockSniper-main\requirements.txtCollecting requests==2.25.1Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB)Collecting pandas==1.3.2Using cached pandas-1.3.2.tar.gz (4.7 MB)Installing build dependencies ... errorerror: subprocess-exited-with-error
pip subprocess to install build dependencies did not run successfully.exit code: 1╰─> [319 lines of output]Ignoring numpy: markers 'python_version == "3.7" and (platform_machine != "arm64" or platform_system != "Darwin") and platform_machine != "aarch64"' don't match your environmentIgnoring numpy: markers 'python_version == "3.8" and (platform_machine != "arm64" or platform_system != "Darwin") and platform_machine != "aarch64"' don't match your environmentIgnoring numpy: markers 'python_version == "3.7" and platform_machine == "aarch64"' don't match your environmentIgnoring numpy: markers 'python_version == "3.8" and platform_machine == "aarch64"' don't match your environmentIgnoring numpy: markers 'python_version == "3.8" and platform_machine == "arm64" and platform_system == "Darwin"' don't match your environmentIgnoring numpy: markers 'python_version == "3.9" and platform_machine == "arm64" and platform_system == "Darwin"' don't match your environmentCollecting setuptools>=51.0.0Using cached setuptools-65.5.0-py3-none-any.whl (1.2 MB)Collecting wheelUsing cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)Collecting Cython<3,>=0.29.21Using cached Cython-0.29.32-py2.py3-none-any.whl (986 kB)Collecting numpy==1.19.3Using cached numpy-1.19.3.zip (7.3 MB)Installing build dependencies: startedInstalling build dependencies: finished with status 'done'Getting requirements to build wheel: startedGetting requirements to build wheel: finished with status 'done'Preparing metadata (pyproject.toml): startedPreparing metadata (pyproject.toml): finished with status 'error'error: subprocess-exited-with-error
Preparing metadata (pyproject.toml) did not run successfully.exit code: 1
[282 lines of output]setup.py:67: RuntimeWarning: NumPy 1.19.3 may not yet support Python 3.11.warnings.warn(Running from numpy source directory.setup.py:480: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templatesrun_build = parse_setuppy_commands()Processing numpy/random_bounded_integers.pxd.inProcessing numpy/random\bit_generator.pyxProcessing numpy/random\mtrand.pyxProcessing numpy/random_bounded_integers.pyx.inProcessing numpy/random_common.pyxProcessing numpy/random_generator.pyxProcessing numpy/random_mt19937.pyxProcessing numpy/random_pcg64.pyxProcessing numpy/random_philox.pyxProcessing numpy/random_sfc64.pyxCythonizing sourcesblas_opt_info:blas_mkl_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries mkl_rt not found in ['C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\lib', 'C:\', 'C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\libs']NOT AVAILABLE
blis_info:libraries blis not found in ['C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\lib', 'C:\', 'C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\libs']NOT AVAILABLE
openblas_info:libraries openblas not found in ['C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\lib', 'C:\', 'C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\libs']get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'customize GnuFCompilerCould not locate executable g77Could not locate executable f77customize IntelVisualFCompilerCould not locate executable ifortCould not locate executable iflcustomize AbsoftFCompilerCould not locate executable f90customize CompaqVisualFCompilerCould not locate executable DFcustomize IntelItaniumVisualFCompilerCould not locate executable eflcustomize Gnu95FCompilerCould not locate executable gfortranCould not locate executable f95customize G95FCompilerCould not locate executable g95customize IntelEM64VisualFCompilercustomize IntelEM64TFCompilerCould not locate executable efortCould not locate executable efccustomize PGroupFlangCompilerCould not locate executable flangdon't know how to compile Fortran code on platform 'nt'NOT AVAILABLE
atlas_3_10_blas_threads_info:Setting PTATLAS=ATLASlibraries tatlas not found in ['C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\lib', 'C:\', 'C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\libs']NOT AVAILABLE
atlas_3_10_blas_info:libraries satlas not found in ['C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\lib', 'C:\', 'C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\libs']NOT AVAILABLE
atlas_blas_threads_info:Setting PTATLAS=ATLASlibraries ptf77blas,ptcblas,atlas not found in ['C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\lib', 'C:\', 'C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\libs']NOT AVAILABLE
atlas_blas_info:libraries f77blas,cblas,atlas not found in ['C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\lib', 'C:\', 'C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\libs']NOT AVAILABLE
accelerate_info:NOT AVAILABLE
C:\Users\Rmuij\AppData\Local\Temp\pip-install-5e71ys0j\numpy_3501de011f2d41f48272ef5a36b5d0c8\numpy\distutils\system_info.py:1914: 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 switchingBlas library.if self._calc_info(blas):blas_info:libraries blas not found in ['C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\lib', 'C:\', 'C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\libs']NOT AVAILABLE
C:\Users\Rmuij\AppData\Local\Temp\pip-install-5e71ys0j\numpy_3501de011f2d41f48272ef5a36b5d0c8\numpy\distutils\system_info.py:1914: UserWarning:Blas (http://www.netlib.org/blas/) libraries not found.Directories to search for the libraries can be specified in thenumpy/distutils/site.cfg file (section [blas]) or by settingthe BLAS environment variable.if self._calc_info(blas):blas_src_info:NOT AVAILABLE
C:\Users\Rmuij\AppData\Local\Temp\pip-install-5e71ys0j\numpy_3501de011f2d41f48272ef5a36b5d0c8\numpy\distutils\system_info.py:1914: UserWarning:Blas (http://www.netlib.org/blas/) sources not found.Directories to search for the sources can be specified in thenumpy/distutils/site.cfg file (section [blas_src]) or by settingthe BLAS_SRC environment variable.if self._calc_info(blas):NOT AVAILABLE
non-existing path in 'numpy\distutils': 'site.cfg'lapack_opt_info:lapack_mkl_info:libraries mkl_rt not found in ['C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\lib', 'C:\', 'C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\libs']NOT AVAILABLE
openblas_lapack_info:libraries openblas not found in ['C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\lib', 'C:\', 'C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\libs']NOT AVAILABLE
openblas_clapack_info:libraries openblas,lapack not found in ['C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\lib', 'C:\', 'C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\libs']NOT AVAILABLE
flame_info:libraries flame not found in ['C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\lib', 'C:\', 'C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\libs']NOT AVAILABLE
atlas_3_10_threads_info:Setting PTATLAS=ATLASlibraries lapack_atlas not found in C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\liblibraries tatlas,tatlas not found in C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\liblibraries lapack_atlas not found in C:libraries tatlas,tatlas not found in C:libraries lapack_atlas not found in C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\libslibraries tatlas,tatlas not found in C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\libs<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>NOT AVAILABLE
atlas_3_10_info:libraries lapack_atlas not found in C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\liblibraries satlas,satlas not found in C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\liblibraries lapack_atlas not found in C:libraries satlas,satlas not found in C:libraries lapack_atlas not found in C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\libslibraries satlas,satlas not found in C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\libs<class 'numpy.distutils.system_info.atlas_3_10_info'>NOT AVAILABLE
atlas_threads_info:Setting PTATLAS=ATLASlibraries lapack_atlas not found in C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\liblibraries ptf77blas,ptcblas,atlas not found in C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\liblibraries lapack_atlas not found in C:libraries ptf77blas,ptcblas,atlas not found in C:libraries lapack_atlas not found in C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\libslibraries ptf77blas,ptcblas,atlas not found in C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\libs<class 'numpy.distutils.system_info.atlas_threads_info'>NOT AVAILABLE
atlas_info:libraries lapack_atlas not found in C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\liblibraries f77blas,cblas,atlas not found in C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\liblibraries lapack_atlas not found in C:libraries f77blas,cblas,atlas not found in C:libraries lapack_atlas not found in C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\libslibraries f77blas,cblas,atlas not found in C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\libs<class 'numpy.distutils.system_info.atlas_info'>NOT AVAILABLE
lapack_info:libraries lapack not found in ['C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\lib', 'C:\', 'C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\libs']NOT AVAILABLE
C:\Users\Rmuij\AppData\Local\Temp\pip-install-5e71ys0j\numpy_3501de011f2d41f48272ef5a36b5d0c8\numpy\distutils\system_info.py:1748: UserWarning:Lapack (http://www.netlib.org/lapack/) libraries not found.Directories to search for the libraries can be specified in thenumpy/distutils/site.cfg file (section [lapack]) or by settingthe LAPACK environment variable.return getattr(self, 'calc_info{}'.format(name))()lapack_src_info:NOT AVAILABLE
C:\Users\Rmuij\AppData\Local\Temp\pip-install-5e71ys0j\numpy_3501de011f2d41f48272ef5a36b5d0c8\numpy\distutils\system_info.py:1748: UserWarning:Lapack (http://www.netlib.org/lapack/) sources not found.Directories to search for the sources can be specified in thenumpy/distutils/site.cfg file (section [lapack_src]) or by settingthe LAPACK_SRC environment variable.return getattr(self, 'calc_info{}'.format(name))()NOT AVAILABLE
numpy_linalg_lapack_lite:FOUND:language = cdefine_macros = [('HAVE_BLAS_ILP64', None), ('BLAS_SYMBOL_SUFFIX', '64_')]
C:\Users\Rmuij\AppData\Local\Temp\pip-build-env-6q0wq8a0\overlay\Lib\site-packages\setuptools_distutils\dist.py:275: UserWarning: Unknown distribution option: 'define_macros'warnings.warn(msg)running dist_inforunning build_srcbuild_srcbuilding py_modules sourcescreating buildcreating build\src.win-amd64-3.11creating build\src.win-amd64-3.11\numpycreating build\src.win-amd64-3.11\numpy\distutilsbuilding library "npymath" sourcesTraceback (most recent call last):File "C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 351, in <module>main()File "C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 333, in mainjson_out['return_val'] = hook(**hook_input['kwargs'])^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "C:\Users\Rmuij\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 152, in prepare_metadata_for_build_wheelreturn hook(metadata_directory, config_settings)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "C:\Users\Rmuij\AppData\Local\Temp\pip-build-env-6q0wq8a0\overlay\Lib\site-packages\setuptools\build_meta.py", line 157, in prepare_metadata_for_build_wheelself.run_setup()File "C:\Users\Rmuij\AppData\Local\Temp\pip-build-env-6q0wq8a0\overlay\Lib\site-packages\setuptools\build_meta.py", line 249, in run_setupself).run_setup(setup_script=setup_script)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "C:\Users\Rmuij\AppData\Local\Temp\pip-build-env-6q0wq8a0\overlay\Lib\site-packages\setuptools\build_meta.py", line 142, in run_setupexec(compile(code, file, 'exec'), locals())File "setup.py", line 508, in <module>setup_package()File "setup.py", line 500, in setup_packagesetup(**metadata)File "C:\Users\Rmuij\AppData\Local\Temp\pip-install-5e71ys0j\numpy_3501de011f2d41f48272ef5a36b5d0c8\numpy\distutils\core.py", line 169, in setupreturn old_setup(**new_attr)^^^^^^^^^^^^^^^^^^^^^File "C:\Users\Rmuij\AppData\Local\Temp\pip-build-env-6q0wq8a0\overlay\Lib\site-packages\setuptools_init_.py", line 165, in setupreturn distutils.core.setup(**attrs)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "C:\Users\Rmuij\AppData\Local\Temp\pip-build-env-6q0wq8a0\overlay\Lib\site-packages\setuptools_distutils\core.py", line 148, in setupdist.run_commands()File "C:\Users\Rmuij\AppData\Local\Temp\pip-build-env-6q0wq8a0\overlay\Lib\site-packages\setuptools_distutils\dist.py", line 967, in run_commandsself.run_command(cmd)File "C:\Users\Rmuij\AppData\Local\Temp\pip-build-env-6q0wq8a0\overlay\Lib\site-packages\setuptools_distutils\dist.py", line 986, in run_commandcmd_obj.run()File "C:\Users\Rmuij\AppData\Local\Temp\pip-build-env-6q0wq8a0\overlay\Lib\site-packages\setuptools\command\dist_info.py", line 31, in runegg_info.run()File "C:\Users\Rmuij\AppData\Local\Temp\pip-install-5e71ys0j\numpy_3501de011f2d41f48272ef5a36b5d0c8\numpy\distutils\command\egg_info.py", line 24, in runself.run_command("build_src")File "C:\Users\Rmuij\AppData\Local\Temp\pip-build-env-6q0wq8a0\overlay\Lib\site-packages\setuptools_distutils\cmd.py", line 313, in run_commandself.distribution.run_command(command)File "C:\Users\Rmuij\AppData\Local\Temp\pip-build-env-6q0wq8a0\overlay\Lib\site-packages\setuptools_distutils\dist.py", line 986, in run_commandcmd_obj.run()File "C:\Users\Rmuij\AppData\Local\Temp\pip-install-5e71ys0j\numpy_3501de011f2d41f48272ef5a36b5d0c8\numpy\distutils\command\build_src.py", line 144, in runself.build_sources()File "C:\Users\Rmuij\AppData\Local\Temp\pip-install-5e71ys0j\numpy_3501de011f2d41f48272ef5a36b5d0c8\numpy\distutils\command\build_src.py", line 155, in build_sourcesself.build_library_sources(libname_info)File "C:\Users\Rmuij\AppData\Local\Temp\pip-install-5e71ys0j\numpy_3501de011f2d41f48272ef5a36b5d0c8\numpy\distutils\command\build_src.py", line 288, in build_library_sourcessources = self.generate_sources(sources, (lib_name, build_info))^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "C:\Users\Rmuij\AppData\Local\Temp\pip-install-5e71ys0j\numpy_3501de011f2d41f48272ef5a36b5d0c8\numpy\distutils\command\build_src.py", line 378, in generate_sourcessource = func(extension, build_dir)^^^^^^^^^^^^^^^^^^^^^^^^^^File "numpy\core\setup.py", line 658, in get_mathlib_infost = config_cmd.try_link('int main(void) { return 0;}')^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "C:\Users\Rmuij\AppData\Local\Temp\pip-build-env-6q0wq8a0\overlay\Lib\site-packages\setuptools_distutils\command\config.py", line 243, in try_linkself._link(body, headers, include_dirs,File "C:\Users\Rmuij\AppData\Local\Temp\pip-install-5e71ys0j\numpy_3501de011f2d41f48272ef5a36b5d0c8\numpy\distutils\command\config.py", line 162, in _linkreturn self._wrap_method(old_config._link, lang,^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "C:\Users\Rmuij\AppData\Local\Temp\pip-install-5e71ys0j\numpy_3501de011f2d41f48272ef5a36b5d0c8\numpy\distutils\command\config.py", line 96, in _wrap_methodret = mth(((self,)+args))^^^^^^^^^^^^^^^^^^^^File "C:\Users\Rmuij\AppData\Local\Temp\pip-build-env-6q0wq8a0\overlay\Lib\site-packages\setuptools_distutils\command\config.py", line 137, in _link(src, obj) = self._compile(body, headers, include_dirs, lang)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "C:\Users\Rmuij\AppData\Local\Temp\pip-install-5e71ys0j\numpy_3501de011f2d41f48272ef5a36b5d0c8\numpy\distutils\command\config.py", line 105, in _compilesrc, obj = self._wrap_method(old_config._compile, lang,^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "C:\Users\Rmuij\AppData\Local\Temp\pip-install-5e71ys0j\numpy_3501de011f2d41f48272ef5a36b5d0c8\numpy\distutils\command\config.py", line 96, in _wrap_methodret = mth(*((self,)+args))^^^^^^^^^^^^^^^^^^^^File "C:\Users\Rmuij\AppData\Local\Temp\pip-build-env-6q0wq8a0\overlay\Lib\site-packages\setuptools_distutils\command\config.py", line 132, in _compileself.compiler.compile([src], include_dirs=include_dirs)File "C:\Users\Rmuij\AppData\Local\Temp\pip-build-env-6q0wq8a0\overlay\Lib\site-packages\setuptools_distutils_msvccompiler.py", line 401, in compileself.spawn(args)File "C:\Users\Rmuij\AppData\Local\Temp\pip-build-env-6q0wq8a0\overlay\Lib\site-packages\setuptools_distutils_msvccompiler.py", line 505, in spawnreturn super().spawn(cmd, env=env)^^^^^^^^^^^^^^^^^^^^^^^^^^^File "C:\Users\Rmuij\AppData\Local\Temp\pip-install-5e71ys0j\numpy_3501de011f2d41f48272ef5a36b5d0c8\numpy\distutils\ccompiler.py", line 90, in <lambda>m = lambda self, *args, **kw: func(self, *args, **kw)^^^^^^^^^^^^^^^^^^^^^^^TypeError: CCompiler_spawn() got an unexpected keyword argument 'env'[end of output]note: This error originates from a subprocess, and is likely not a problem with pip.error: metadata-generation-failedEncountered error while generating package metadata.See above for output.note: This is an issue with the package mentioned above, not pip.hint: See above for details.
[end of output]note: This error originates from a subprocess, and is likely not a problem with pip.error: subprocess-exited-with-errorpip subprocess to install build dependencies did not run successfully.exit code: 1See above for output.note: This error originates from a subprocess, and is likely not a problem with pip.
Tried to run the line, and expected it to complete the setup. What happened error.
Downgrading seemed to work as a temporarily fix. Created a 3.7.8 environment.

Issue installing picamera (ERROR: Command errored out with exit status 1:)

Im trying to install picamera (pip install picamera) and I get the following error:
ERROR: Command errored out with exit status 1:
Can someone please help?
Python 3.9.1
pip 20.3.3
Full error message:
ERROR: Command errored out with exit status 1:
command: /usr/local/opt/python#3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py'"'"'; __file__='"'"'/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/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/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-wheel-x36s0i1b
cwd: /private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/
Complete output (61 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/picamera
copying picamera/streams.py -> build/lib/picamera
copying picamera/color.py -> build/lib/picamera
copying picamera/__init__.py -> build/lib/picamera
copying picamera/encoders.py -> build/lib/picamera
copying picamera/renderers.py -> build/lib/picamera
copying picamera/display.py -> build/lib/picamera
copying picamera/camera.py -> build/lib/picamera
copying picamera/frames.py -> build/lib/picamera
copying picamera/exc.py -> build/lib/picamera
copying picamera/bcm_host.py -> build/lib/picamera
copying picamera/mmalobj.py -> build/lib/picamera
copying picamera/array.py -> build/lib/picamera
copying picamera/mmal.py -> build/lib/picamera
running egg_info
writing picamera.egg-info/PKG-INFO
writing dependency_links to picamera.egg-info/dependency_links.txt
writing requirements to picamera.egg-info/requires.txt
writing top-level names to picamera.egg-info/top_level.txt
reading manifest file 'picamera.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'debian'
no previously-included directories found matching 'docs'
writing manifest file 'picamera.egg-info/SOURCES.txt'
installing to build/bdist.macosx-10.15-x86_64/wheel
running install
Traceback (most recent call last):
File "/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py", line 101, in run
with io.open('/proc/cpuinfo', 'r') as cpuinfo:
FileNotFoundError: [Errno 2] No such file or directory: '/proc/cpuinfo'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py", line 145, in <module>
main()
File "/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py", line 119, in main
setup(
File "/usr/local/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/local/Cellar/python#3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/Cellar/python#3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/python#3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 335, in run
self.run_command('install')
File "/usr/local/Cellar/python#3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/python#3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py", line 113, in run
raise ValueError('Unable to open /proc/cpuinfo')
ValueError: Unable to open /proc/cpuinfo
----------------------------------------
ERROR: Failed building wheel for picamera
Running setup.py clean for picamera
Failed to build picamera
Installing collected packages: picamera
Running setup.py install for picamera ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/opt/python#3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py'"'"'; __file__='"'"'/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-record-qme1_imo/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/picamera
cwd: /private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/
Complete output (25 lines):
running install
Traceback (most recent call last):
File "/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py", line 101, in run
with io.open('/proc/cpuinfo', 'r') as cpuinfo:
FileNotFoundError: [Errno 2] No such file or directory: '/proc/cpuinfo'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py", line 145, in <module>
main()
File "/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py", line 119, in main
setup(
File "/usr/local/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/local/Cellar/python#3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/Cellar/python#3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/python#3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py", line 113, in run
raise ValueError('Unable to open /proc/cpuinfo')
ValueError: Unable to open /proc/cpuinfo
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/opt/python#3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py'"'"'; __file__='"'"'/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-record-qme1_imo/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/picamera Check the logs for full command output.

MSYS2 pip install numpy failed

I am new to MSYS2, so I tried to install numpy using pip (mingw-w64-x86_64-python3-pip-9.0.1-3), but the the installation is failed. Here is the output:
(...)
C compiler: x86_64-pc-msys-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -march=x86-64 -mtune=generic -O2 -pipe
compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/include/python3.6m -c'
x86_64-pc-msys-gcc: _configtest.c
/usr/bin/bash: x86_64-pc-msys-gcc: command not found
/usr/bin/bash: x86_64-pc-msys-gcc: command not found
failure.
removing: _configtest.c _configtest.o
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-3d852664/numpy/setup.py", line 394, in <module>
setup_package()
File "/tmp/pip-build-3d852664/numpy/setup.py", line 386, in setup_package
setup(**metadata)
File "/tmp/pip-build-3d852664/numpy/numpy/distutils/core.py", line 169, in setup
return old_setup(**new_attr)
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 "/tmp/pip-build-3d852664/numpy/numpy/distutils/command/install.py", line 62, in run
r = self.setuptools_run()
File "/tmp/pip-build-3d852664/numpy/numpy/distutils/command/install.py", line 36, in setuptools_run
return distutils_install.run(self)
File "/usr/lib/python3.6/distutils/command/install.py", line 551, in run
self.run_command('build')
File "/usr/lib/python3.6/distutils/cmd.py", line 314, 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 "/tmp/pip-build-3d852664/numpy/numpy/distutils/command/build.py", line 47, in run
old_build.run(self)
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 314, 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 "/tmp/pip-build-3d852664/numpy/numpy/distutils/command/build_src.py", line 148, in run
self.build_sources()
File "/tmp/pip-build-3d852664/numpy/numpy/distutils/command/build_src.py", line 159, in build_sources
self.build_library_sources(*libname_info)
File "/tmp/pip-build-3d852664/numpy/numpy/distutils/command/build_src.py", line 294, in build_library_sources
sources = self.generate_sources(sources, (lib_name, build_info))
File "/tmp/pip-build-3d852664/numpy/numpy/distutils/command/build_src.py", line 377, in generate_sources
source = func(extension, build_dir)
File "numpy/core/setup.py", line 675, in get_mathlib_info
raise RuntimeError("Broken toolchain: cannot link a simple C program")
RuntimeError: Broken toolchain: cannot link a simple C program
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-3d852664/numpy/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-4nnf7xbj-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-3d852664/numpy/
I have already build tools installed: I used the tutorial on https://github.com/orlp/dev-on-windows/wiki/Installing-GCC--&-MSYS2 (I only 64-bit packages)
I looked for similar issues on the net but I found nothing relevant.
Any comment or suggestion is welcome
Thanks in advance
The proper gcc compiler has not been installed. For my installation, I used the msys2 shell (not mingw) and installed the msys/gcc package:
pacman -S msys/gcc
pacman -S mingw-w64-x86_64-python-scipy
pacman -S mingw-w64-i686-python-scipy

Enabling GPU with theano generates Exception

I have followed the steps from here to enable gpu with theano on an Ubuntu 16.04 machine. I installed cuda toolkit, cudnn, drivers but I am still not able to get it to work. And when I run:
from theano.sandbox import cuda
cuda.use("gpu0")
I get the following exception:
Exception: ('The following error happened while compiling the node', GpuCAReduce{add}{1}(<CudaNdarrayType(float32, vector)>), '\n', 'nvcc return status', 1, 'for cmd', 'nvcc -shared -O3 -arch=sm_50 -m64 -Xcompiler -fno-math-errno,-Wno-unused-label,-Wno-unused-variable,-Wno-write-strings,-DCUDA_NDARRAY_CUH=c72d035fdf91890f3b36710688069b2e,-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,-fPIC,-fvisibility=hidden -Xlinker -rpath,/home/...ledir_Linux-4.10--generic-x86_64-with-debian-stretch-sid-x86_64-2.7.13-64/cuda_ndarray -I/home/...ledir_Linux-4.10--generic-x86_64-with-debian-stretch-sid-x86_64-2.7.13-64/cuda_ndarray -I/usr/include -I/home/...thon2.7/site-packages/numpy/core/include -I/home/.../python2.7 -I/home/.../python2.7/site-packages/theano/gof -I/home/.../python2.7/site-packages/theano/sandbox/cuda -L/home/...ledir_Linux-4.10--generic-x86_64-with-debian-stretch-sid-x86_64-2.7.13-64/cuda_ndarray -L/home/... -o /home/...ledir_Linux-4.10--generic-x86_64-with-debian-stretch-sid-x86_64-2.7.13-64/tmpYVhcOM/544270fe7a21a748315f83abfe0913cc.so mod.cu -lcudart -lcublas -lcuda_ndarray -lpython2.7', '[GpuCAReduce{add}{1}(<CudaNdarrayType(float32, vector)>)]')
How can I fix this error?
Here is the full error trace:
Python 2.7.13 |Anaconda 4.4.0 (64-bit)| (default, Dec 20 2016, 23:09:15)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> from theano.sandbox import cuda
>>> cuda.use("gpu0")
WARNING (theano.sandbox.cuda): The cuda backend is deprecated and will be removed in the next release (v0.10). Please switch to the gpuarray backend. You can get more information about how to switch at this URL:
https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpuarray%29
/home/.../python2.7/site-packages/theano/sandbox/cuda/__init__.py:556: UserWarning: Theano flag device=gpu* (old gpu back-end) only support floatX=float32. You have floatX=float64. Use the new gpu back-end with device=cuda* for that value of floatX.
warnings.warn(msg)
WARNING (theano.gof.compilelock): Overriding existing lock by dead process '8175' (I am process '2320')
In file included from /home/.../python2.7/Python.h:8:0,
from mod.cu:1:
/home/.../python2.7/pyconfig.h:1190:0: warning: "_POSIX_C_SOURCE" redefined
#define _POSIX_C_SOURCE 200112L
^
In file included from /usr/include/host_config.h:161:0,
from /usr/include/cuda_runtime.h:76,
from <command-line>:0:
/usr/include/features.h:228:0: note: this is the location of the previous definition
# define _POSIX_C_SOURCE 200809L
^
In file included from /home/.../python2.7/Python.h:8:0,
from mod.cu:1:
/home/.../python2.7/pyconfig.h:1212:0: warning: "_XOPEN_SOURCE" redefined
#define _XOPEN_SOURCE 600
^
In file included from /usr/include/host_config.h:161:0,
from /usr/include/cuda_runtime.h:76,
from <command-line>:0:
/usr/include/features.h:169:0: note: this is the location of the previous definition
# define _XOPEN_SOURCE 700
^
In file included from /home/.../python2.7/Python.h:8:0,
from mod.cu:1:
/home/.../python2.7/pyconfig.h:1190:0: warning: "_POSIX_C_SOURCE" redefined
#define _POSIX_C_SOURCE 200112L
^
In file included from /usr/include/host_config.h:161:0,
from /usr/include/cuda_runtime.h:76,
from <command-line>:0:
/usr/include/features.h:228:0: note: this is the location of the previous definition
# define _POSIX_C_SOURCE 200809L
^
In file included from /home/.../python2.7/Python.h:8:0,
from mod.cu:1:
/home/.../python2.7/pyconfig.h:1212:0: warning: "_XOPEN_SOURCE" redefined
#define _XOPEN_SOURCE 600
^
In file included from /usr/include/host_config.h:161:0,
from /usr/include/cuda_runtime.h:76,
from <command-line>:0:
/usr/include/features.h:169:0: note: this is the location of the previous definition
# define _XOPEN_SOURCE 700
^
/usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’:
/usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope
return (char *) memcpy (__dest, __src, __n) + __n;
^
mod.cu: In member function ‘int _GLOBAL__N__38_tmpxft_00000948_00000000_9_mod_cpp1_ii_ae46f2fe::__struct_compiled_op_544270fe7a21a748315f83abfe0913cc::run()’:
mod.cu:388:172: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
['nvcc', '-shared', '-O3', '-arch=sm_50', '-m64', '-Xcompiler', '-fno-math-errno,-Wno-unused-label,-Wno-unused-variable,-Wno-write-strings,-DCUDA_NDARRAY_CUH=c72d035fdf91890f3b36710688069b2e,-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,-fPIC,-fvisibility=hidden', '-Xlinker', '-rpath,/home/...ledir_Linux-4.10--generic-x86_64-with-debian-stretch-sid-x86_64-2.7.13-64/cuda_ndarray', '-I/home/...ledir_Linux-4.10--generic-x86_64-with-debian-stretch-sid-x86_64-2.7.13-64/cuda_ndarray', '-I/usr/include', '-I/home/...thon2.7/site-packages/numpy/core/include', '-I/home/.../python2.7', '-I/home/.../python2.7/site-packages/theano/gof', '-I/home/.../python2.7/site-packages/theano/sandbox/cuda', '-L/home/...ledir_Linux-4.10--generic-x86_64-with-debian-stretch-sid-x86_64-2.7.13-64/cuda_ndarray', '-L/home/...', '-o', '/home/...ledir_Linux-4.10--generic-x86_64-with-debian-stretch-sid-x86_64-2.7.13-64/tmpYVhcOM/544270fe7a21a748315f83abfe0913cc.so', 'mod.cu', '-lcudart', '-lcublas', '-lcuda_ndarray', '-lpython2.7']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/.../python2.7/site-packages/theano/sandbox/cuda/__init__.py", line 593, in use
theano.sandbox.cuda.tests.test_driver.test_nvidia_driver1()
File "/home/.../python2.7/site-packages/theano/sandbox/cuda/tests/test_driver.py", line 32, in test_nvidia_driver1
profile=False)
File "/home/.../python2.7/site-packages/theano/compile/function.py", line 326, in function
output_keys=output_keys)
File "/home/.../python2.7/site-packages/theano/compile/pfunc.py", line 486, in pfunc
output_keys=output_keys)
File "/home/.../python2.7/site-packages/theano/compile/function_module.py", line 1795, in orig_function
defaults)
File "/home/.../python2.7/site-packages/theano/compile/function_module.py", line 1661, in create
input_storage=input_storage_lists, storage_map=storage_map)
File "/home/.../python2.7/site-packages/theano/gof/link.py", line 699, in make_thunk
storage_map=storage_map)[:3]
File "/home/.../python2.7/site-packages/theano/gof/vm.py", line 1047, in make_all
impl=impl))
File "/home/.../python2.7/site-packages/theano/gof/op.py", line 935, in make_thunk
no_recycling)
File "/home/.../python2.7/site-packages/theano/gof/op.py", line 839, in make_c_thunk
output_storage=node_output_storage)
File "/home/.../python2.7/site-packages/theano/gof/cc.py", line 1190, in make_thunk
keep_lock=keep_lock)
File "/home/.../python2.7/site-packages/theano/gof/cc.py", line 1131, in __compile__
keep_lock=keep_lock)
File "/home/.../python2.7/site-packages/theano/gof/cc.py", line 1586, in cthunk_factory
key=key, lnk=self, keep_lock=keep_lock)
File "/home/.../python2.7/site-packages/theano/gof/cmodule.py", line 1159, in module_from_key
module = lnk.compile_cmodule(location)
File "/home/.../python2.7/site-packages/theano/gof/cc.py", line 1489, in compile_cmodule
preargs=preargs)
File "/home/.../python2.7/site-packages/theano/sandbox/cuda/nvcc_compiler.py", line 405, in compile_str
'for cmd', ' '.join(cmd))
Exception: ('The following error happened while compiling the node', GpuCAReduce{add}{1}(<CudaNdarrayType(float32, vector)>), '\n', 'nvcc return status', 1, 'for cmd', 'nvcc -shared -O3 -arch=sm_50 -m64 -Xcompiler -fno-math-errno,-Wno-unused-label,-Wno-unused-variable,-Wno-write-strings,-DCUDA_NDARRAY_CUH=c72d035fdf91890f3b36710688069b2e,-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,-fPIC,-fvisibility=hidden -Xlinker -rpath,/home/...ledir_Linux-4.10--generic-x86_64-with-debian-stretch-sid-x86_64-2.7.13-64/cuda_ndarray -I/home/...ledir_Linux-4.10--generic-x86_64-with-debian-stretch-sid-x86_64-2.7.13-64/cuda_ndarray -I/usr/include -I/home/...thon2.7/site-packages/numpy/core/include -I/home/.../python2.7 -I/home/.../python2.7/site-packages/theano/gof -I/home/.../python2.7/site-packages/theano/sandbox/cuda -L/home/...ledir_Linux-4.10--generic-x86_64-with-debian-stretch-sid-x86_64-2.7.13-64/cuda_ndarray -L/home/... -o /home/...ledir_Linux-4.10--generic-x86_64-with-debian-stretch-sid-x86_64-2.7.13-64/tmpYVhcOM/544270fe7a21a748315f83abfe0913cc.so mod.cu -lcudart -lcublas -lcuda_ndarray -lpython2.7', '[GpuCAReduce{add}{1}(<CudaNdarrayType(float32, vector)>)]')

xmlsec on el capitan

I'm trying to install xmlsec on El Capitan and i'm not able to do so.
I'm following instructions on this page:
https://github.com/concordusapps/python-xmlsec
when I do pip install xmlsec I get:
Downloading xmlsec-0.3.1.tar.gz
Complete output from command python setup.py egg_info:
no previously-included directories found matching 'doc/.build'
Installed /private/tmp/easy_install-kotwF5/pkgconfig-1.1.0/.eggs/nose-1.3.7-py2.7.egg
zip_safe flag not set; analyzing archive contents...
Installed /private/tmp/pip-build-my91LX/xmlsec/.eggs/pkgconfig-1.1.0-py2.7.egg
Searching for setuptools-cython
Reading https://pypi.python.org/simple/setuptools_cython/
Best match: setuptools-cython 0.2.1
Downloading https://pypi.python.org/packages/source/s/setuptools_cython/setuptools_cython-0.2.1.tar.gz#md5=c29fc5bf2894e69cbd98e3800cef4707
Processing setuptools_cython-0.2.1.tar.gz
Writing /tmp/easy_install-xnAHIU/setuptools_cython-0.2.1/setup.cfg
Running setuptools_cython-0.2.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-xnAHIU/setuptools_cython-0.2.1/egg-dist-tmp-zk1125
zip_safe flag not set; analyzing archive contents...
Copying setuptools_cython-0.2.1-py2.7.egg to /private/tmp/pip-build-my91LX/xmlsec/.eggs
Installed /private/tmp/pip-build-my91LX/xmlsec/.eggs/setuptools_cython-0.2.1-py2.7.egg
Searching for Cython
Reading https://pypi.python.org/simple/Cython/
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/private/tmp/pip-build-my91LX/xmlsec/setup.py", line 121, in <module>
make_extension('xmlsec.template'),
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python2.7/site-packages/setuptools/dist.py", line 268, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/local/lib/python2.7/site-packages/setuptools/dist.py", line 313, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 836, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1081, in best_match
return self.obtain(req, installer)
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1093, in obtain
return installer(requirement)
File "/usr/local/lib/python2.7/site-packages/setuptools/dist.py", line 380, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 626, in easy_install
not self.always_copy, self.local_index
File "/usr/local/lib/python2.7/site-packages/setuptools/package_index.py", line 590, in fetch_distribution
self.find_packages(requirement)
File "/usr/local/lib/python2.7/site-packages/setuptools/package_index.py", line 427, in find_packages
self.scan_url(self.index_url + requirement.unsafe_name+'/')
File "/usr/local/lib/python2.7/site-packages/setuptools/package_index.py", line 761, in scan_url
self.process_url(url, True)
File "/usr/local/lib/python2.7/site-packages/setuptools/package_index.py", line 304, in process_url
f = self.open_url(url, "Download error on %s: %%s -- Some packages may not be found!" % url)
File "/usr/local/lib/python2.7/site-packages/setuptools/package_index.py", line 700, in open_url
return open_with_auth(url, self.opener)
File "/usr/local/lib/python2.7/site-packages/setuptools/package_index.py", line 894, in _socket_timeout
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/setuptools/package_index.py", line 1007, in open_with_auth
fp = opener(request)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
response = meth(req, response)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 469, in error
result = self._call_chain(*args)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 656, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
response = meth(req, response)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 469, in error
result = self._call_chain(*args)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 656, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1240, in https_open
context=self._context)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1200, in do_open
r = h.getresponse(buffering=True)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1132, in getresponse
response.begin()
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 453, in begin
version, status, reason = self._read_status()
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 409, in _read_status
line = self.fp.readline(_MAXLINE + 1)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 480, in readline
data = self._sock.recv(self._rbufsize)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 734, in recv
return self.read(buflen)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 621, in read
v = self._sslobj.read(len or 1024)
ssl.SSLError: ('The read operation timed out',)
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-my91LX/xmlsec
and when I download the source and do it manually I get:
Processing /Users/myuser/python-xmlsec
Requirement already satisfied (use --upgrade to upgrade): lxml>=3.0 in /usr/local/lib/python2.7/site-packages (from xmlsec==0.1.2)
Installing collected packages: xmlsec
Running setup.py install for xmlsec
Complete output from command /usr/local/opt/python/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip-ad8Fqh-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-X7VjyO-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.11-x86_64-2.7
creating build/lib.macosx-10.11-x86_64-2.7/xmlsec
copying src/xmlsec/__init__.py -> build/lib.macosx-10.11-x86_64-2.7/xmlsec
copying src/xmlsec/meta.py -> build/lib.macosx-10.11-x86_64-2.7/xmlsec
running build_ext
cythoning src/xmlsec/constants.pyx to src/xmlsec/constants.c
building 'xmlsec.constants' extension
creating build/temp.macosx-10.11-x86_64-2.7
creating build/temp.macosx-10.11-x86_64-2.7/src
creating build/temp.macosx-10.11-x86_64-2.7/src/xmlsec
clang -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/lib/python2.7/site-packages/lxml -I/usr/local/lib/python2.7/site-packages/lxml/includes -Isrc -I/usr/local/Cellar/libxml2/2.9.2/include/libxml2 -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/xmlsec/constants.c -o build/temp.macosx-10.11-x86_64-2.7/src/xmlsec/constants.o
In file included from src/xmlsec/constants.c:256:
src/xmlsec.h:1:10: fatal error: 'xmlsec/crypto.h' file not found
#include <xmlsec/crypto.h>
^
1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
Command "/usr/local/opt/python/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip-ad8Fqh-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-X7VjyO-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-ad8Fqh-build
Is there something i'm missing?
This finally worked:
brew install -v libxmlsec1
Obviously this is using homebrew on macOS.
Installing (or reinstalling) limbxmlsec1 didn't work for me on OSX 10.14. Here's what I had to do:
There are some SDK headers that come with xcode. Copy them to the desktop:
cp /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg ~/Desktop
Install the package by double-clicking it, or by running this command:
sudo installer -pkg ~/Desktop/macOS_SDK_headers_for_macOS_10.14.pkg -target /
Try installing again:
pip install xmlsec