TypeError: CCompiler_spawn() got an unexpected keyword argument 'env' - pip

When installing mitiq or numpy==1.20, I get the error mentioned in the title. I have no idea what it means unless I have the wrong c compiler. I don't know where pip looks for a c compiler. Some research on the forums says I should configure setuptools differently. I don't know how to configure setuptools
(venv_qiskit) PS C:\Users\annah\Documents\Dropbox\Quantum-computing-with-Anna> pip install mitiq
Collecting mitiq
Using cached mitiq-0.17.1-py3-none-any.whl (141 kB)
Collecting scipy~=1.7.3
Using cached scipy-1.7.3-cp310-cp310-win_amd64.whl (34.3 MB)
Collecting numpy~=1.20.1
Using cached numpy-1.20.3.zip (7.8 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [300 lines of output]
setup.py:66: RuntimeWarning: NumPy 1.20.3 may not yet support Python 3.10.
warnings.warn(
Running from numpy source directory.
setup.py:485: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
run_build = parse_setuppy_commands()
Processing numpy/random\_bounded_integers.pxd.in
Processing numpy/random\bit_generator.pyx
Processing numpy/random\mtrand.pyx
Processing numpy/random\_bounded_integers.pyx.in
Processing numpy/random\_common.pyx
Processing numpy/random\_generator.pyx
Processing numpy/random\_mt19937.pyx
Processing numpy/random\_pcg64.pyx
Processing numpy/random\_philox.pyx
Processing numpy/random\_sfc64.pyx
Cythonizing sources
blas_opt_info:
blas_mkl_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries mkl_rt not found in ['C:\\Users\\annah\\Documents\\Dropbox\\projects\\qiskit-code\\venv_qiskit\\lib', 'C:\\']
NOT AVAILABLE
blis_info:
libraries blis not found in ['C:\\Users\\annah\\Documents\\Dropbox\\projects\\qiskit-code\\venv_qiskit\\lib', 'C:\\']
NOT AVAILABLE
openblas_info:
libraries openblas not found in ['C:\\Users\\annah\\Documents\\Dropbox\\projects\\qiskit-code\\venv_qiskit\\lib', 'C:\\']
get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
customize GnuFCompiler
Could not locate executable g77
Could not locate executable f77
customize IntelVisualFCompiler
Could not locate executable ifort
Could not locate executable ifl
customize AbsoftFCompiler
Could not locate executable f90
customize CompaqVisualFCompiler
Could not locate executable DF
customize IntelItaniumVisualFCompiler
Could not locate executable efl
customize Gnu95FCompiler
Found executable C:\msys64\mingw64\bin\gfortran.exe
Using built-in specs.
COLLECT_GCC=C:\msys64\mingw64\bin\gfortran.exe
COLLECT_LTO_WRAPPER=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-12.1.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/include --libexecdir=/mingw64/lib --enable-bootstrap --enable-checking=release --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,jit --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-pch --enable-lto --enable-libgomp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev3, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --with-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.1.0 (Rev3, Built by MSYS2 project)
NOT AVAILABLE
atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
libraries tatlas not found in ['C:\\Users\\annah\\Documents\\Dropbox\\projects\\qiskit-code\\venv_qiskit\\lib', 'C:\\']
NOT AVAILABLE
atlas_3_10_blas_info:
libraries satlas not found in ['C:\\Users\\annah\\Documents\\Dropbox\\projects\\qiskit-code\\venv_qiskit\\lib', 'C:\\']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in ['C:\\Users\\annah\\Documents\\Dropbox\\projects\\qiskit-code\\venv_qiskit\\lib', 'C:\\']
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in ['C:\\Users\\annah\\Documents\\Dropbox\\projects\\qiskit-code\\venv_qiskit\\lib', 'C:\\']
NOT AVAILABLE
C:\Users\annah\AppData\Local\Temp\pip-install-3ny_gyvy\numpy_14bbbc1178314af585e7fa52bdb25a09\numpy\distutils\system_info.py:1989: 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.
if self._calc_info(blas):
blas_info:
libraries blas not found in ['C:\\Users\\annah\\Documents\\Dropbox\\projects\\qiskit-code\\venv_qiskit\\lib', 'C:\\']
NOT AVAILABLE
C:\Users\annah\AppData\Local\Temp\pip-install-3ny_gyvy\numpy_14bbbc1178314af585e7fa52bdb25a09\numpy\distutils\system_info.py:1989: UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
if self._calc_info(blas):
blas_src_info:
NOT AVAILABLE
C:\Users\annah\AppData\Local\Temp\pip-install-3ny_gyvy\numpy_14bbbc1178314af585e7fa52bdb25a09\numpy\distutils\system_info.py:1989: UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the 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\\annah\\Documents\\Dropbox\\projects\\qiskit-code\\venv_qiskit\\lib', 'C:\\']
NOT AVAILABLE
openblas_lapack_info:
libraries openblas not found in ['C:\\Users\\annah\\Documents\\Dropbox\\projects\\qiskit-code\\venv_qiskit\\lib', 'C:\\']
get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
customize GnuFCompiler
customize IntelVisualFCompiler
customize AbsoftFCompiler
customize CompaqVisualFCompiler
customize IntelItaniumVisualFCompiler
customize Gnu95FCompiler
Using built-in specs.
COLLECT_GCC=C:\msys64\mingw64\bin\gfortran.exe
COLLECT_LTO_WRAPPER=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-12.1.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/include --libexecdir=/mingw64/lib --enable-bootstrap --enable-checking=release --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,jit --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-pch --enable-lto --enable-libgomp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev3, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --with-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.1.0 (Rev3, Built by MSYS2 project)
NOT AVAILABLE
openblas_clapack_info:
libraries openblas,lapack not found in ['C:\\Users\\annah\\Documents\\Dropbox\\projects\\qiskit-code\\venv_qiskit\\lib', 'C:\\']
get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
customize GnuFCompiler
customize IntelVisualFCompiler
customize AbsoftFCompiler
customize CompaqVisualFCompiler
customize IntelItaniumVisualFCompiler
customize Gnu95FCompiler
Using built-in specs.
COLLECT_GCC=C:\msys64\mingw64\bin\gfortran.exe
COLLECT_LTO_WRAPPER=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-12.1.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/include --libexecdir=/mingw64/lib --enable-bootstrap --enable-checking=release --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,jit --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-pch --enable-lto --enable-libgomp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev3, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --with-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.1.0 (Rev3, Built by MSYS2 project)
NOT AVAILABLE
flame_info:
libraries flame not found in ['C:\\Users\\annah\\Documents\\Dropbox\\projects\\qiskit-code\\venv_qiskit\\lib', 'C:\\']
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
libraries lapack_atlas not found in C:\Users\annah\Documents\Dropbox\projects\qiskit-code\venv_qiskit\lib
libraries tatlas,tatlas not found in C:\Users\annah\Documents\Dropbox\projects\qiskit-code\venv_qiskit\lib
libraries lapack_atlas not found in C:\
libraries tatlas,tatlas not found in C:\
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE
atlas_3_10_info:
libraries lapack_atlas not found in C:\Users\annah\Documents\Dropbox\projects\qiskit-code\venv_qiskit\lib
libraries satlas,satlas not found in C:\Users\annah\Documents\Dropbox\projects\qiskit-code\venv_qiskit\lib
libraries lapack_atlas not found in C:\
libraries satlas,satlas not found in C:\
<class 'numpy.distutils.system_info.atlas_3_10_info'>
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
libraries lapack_atlas not found in C:\Users\annah\Documents\Dropbox\projects\qiskit-code\venv_qiskit\lib
libraries ptf77blas,ptcblas,atlas not found in C:\Users\annah\Documents\Dropbox\projects\qiskit-code\venv_qiskit\lib
libraries lapack_atlas not found in C:\
libraries ptf77blas,ptcblas,atlas not found in C:\
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE
atlas_info:
libraries lapack_atlas not found in C:\Users\annah\Documents\Dropbox\projects\qiskit-code\venv_qiskit\lib
libraries f77blas,cblas,atlas not found in C:\Users\annah\Documents\Dropbox\projects\qiskit-code\venv_qiskit\lib
libraries lapack_atlas not found in C:\
libraries f77blas,cblas,atlas not found in C:\
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
lapack_info:
libraries lapack not found in ['C:\\Users\\annah\\Documents\\Dropbox\\projects\\qiskit-code\\venv_qiskit\\lib', 'C:\\']
NOT AVAILABLE
C:\Users\annah\AppData\Local\Temp\pip-install-3ny_gyvy\numpy_14bbbc1178314af585e7fa52bdb25a09\numpy\distutils\system_info.py:1849: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
return getattr(self, '_calc_info_{}'.format(name))()
lapack_src_info:
NOT AVAILABLE
C:\Users\annah\AppData\Local\Temp\pip-install-3ny_gyvy\numpy_14bbbc1178314af585e7fa52bdb25a09\numpy\distutils\system_info.py:1849: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
return getattr(self, '_calc_info_{}'.format(name))()
NOT AVAILABLE
numpy_linalg_lapack_lite:
FOUND:
language = c
define_macros = [('HAVE_BLAS_ILP64', None), ('BLAS_SYMBOL_SUFFIX', '64_')]
C:\Users\annah\AppData\Local\Temp\pip-build-env-ypoc6x0n\overlay\Lib\site-packages\setuptools\_distutils\dist.py:275: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
running dist_info
running build_src
build_src
building py_modules sources
creating build
creating build\src.win-amd64-3.10
creating build\src.win-amd64-3.10\numpy
creating build\src.win-amd64-3.10\numpy\distutils
building library "npymath" sources
Using built-in specs.
COLLECT_GCC=C:\msys64\mingw64\bin\gfortran.exe
COLLECT_LTO_WRAPPER=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-12.1.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/include --libexecdir=/mingw64/lib --enable-bootstrap --enable-checking=release --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,jit --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-pch --enable-lto --enable-libgomp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev3, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --with-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.1.0 (Rev3, Built by MSYS2 project)
Using built-in specs.
COLLECT_GCC=C:\msys64\mingw64\bin\gfortran.exe
COLLECT_LTO_WRAPPER=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-12.1.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/include --libexecdir=/mingw64/lib --enable-bootstrap --enable-checking=release --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,jit --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-pch --enable-lto --enable-libgomp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev3, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --with-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.1.0 (Rev3, Built by MSYS2 project)
Traceback (most recent call last):
File "C:\Users\annah\Documents\Dropbox\projects\qiskit-code\venv_qiskit\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
main()
File "C:\Users\annah\Documents\Dropbox\projects\qiskit-code\venv_qiskit\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\annah\Documents\Dropbox\projects\qiskit-code\venv_qiskit\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 164, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "C:\Users\annah\AppData\Local\Temp\pip-build-env-ypoc6x0n\overlay\Lib\site-packages\setuptools\build_meta.py", line 157, in prepare_metadata_for_build_wheel
self.run_setup()
File "C:\Users\annah\AppData\Local\Temp\pip-build-env-ypoc6x0n\overlay\Lib\site-packages\setuptools\build_meta.py", line 248, in run_setup
super(_BuildMetaLegacyBackend,
File "C:\Users\annah\AppData\Local\Temp\pip-build-env-ypoc6x0n\overlay\Lib\site-packages\setuptools\build_meta.py", line 142, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 513, in <module>
setup_package()
File "setup.py", line 505, in setup_package
setup(**metadata)
File "C:\Users\annah\AppData\Local\Temp\pip-install-3ny_gyvy\numpy_14bbbc1178314af585e7fa52bdb25a09\numpy\distutils\core.py", line 169, in setup
return old_setup(**new_attr)
File "C:\Users\annah\AppData\Local\Temp\pip-build-env-ypoc6x0n\overlay\Lib\site-packages\setuptools\__init__.py", line 165, in setup
return distutils.core.setup(**attrs)
File "C:\Users\annah\AppData\Local\Temp\pip-build-env-ypoc6x0n\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\annah\AppData\Local\Temp\pip-build-env-ypoc6x0n\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 967, in run_commands
self.run_command(cmd)
File "C:\Users\annah\AppData\Local\Temp\pip-build-env-ypoc6x0n\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "C:\Users\annah\AppData\Local\Temp\pip-build-env-ypoc6x0n\overlay\Lib\site-packages\setuptools\command\dist_info.py", line 31, in run
egg_info.run()
File "C:\Users\annah\AppData\Local\Temp\pip-install-3ny_gyvy\numpy_14bbbc1178314af585e7fa52bdb25a09\numpy\distutils\command\egg_info.py", line 24, in run
self.run_command("build_src")
File "C:\Users\annah\AppData\Local\Temp\pip-build-env-ypoc6x0n\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\annah\AppData\Local\Temp\pip-build-env-ypoc6x0n\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "C:\Users\annah\AppData\Local\Temp\pip-install-3ny_gyvy\numpy_14bbbc1178314af585e7fa52bdb25a09\numpy\distutils\command\build_src.py", line 144, in run
self.build_sources()
File "C:\Users\annah\AppData\Local\Temp\pip-install-3ny_gyvy\numpy_14bbbc1178314af585e7fa52bdb25a09\numpy\distutils\command\build_src.py", line 155, in build_sources
self.build_library_sources(*libname_info)
File "C:\Users\annah\AppData\Local\Temp\pip-install-3ny_gyvy\numpy_14bbbc1178314af585e7fa52bdb25a09\numpy\distutils\command\build_src.py", line 288, in build_library_sources
sources = self.generate_sources(sources, (lib_name, build_info))
File "C:\Users\annah\AppData\Local\Temp\pip-install-3ny_gyvy\numpy_14bbbc1178314af585e7fa52bdb25a09\numpy\distutils\command\build_src.py", line 378, in generate_sources
source = func(extension, build_dir)
File "numpy\core\setup.py", line 671, in get_mathlib_info
st = config_cmd.try_link('int main(void) { return 0;}')
File "C:\Users\annah\AppData\Local\Temp\pip-build-env-ypoc6x0n\overlay\Lib\site-packages\setuptools\_distutils\command\config.py", line 243, in try_link
self._link(body, headers, include_dirs,
File "C:\Users\annah\AppData\Local\Temp\pip-install-3ny_gyvy\numpy_14bbbc1178314af585e7fa52bdb25a09\numpy\distutils\command\config.py", line 162, in _link
return self._wrap_method(old_config._link, lang,
File "C:\Users\annah\AppData\Local\Temp\pip-install-3ny_gyvy\numpy_14bbbc1178314af585e7fa52bdb25a09\numpy\distutils\command\config.py", line 96, in _wrap_method
ret = mth(*((self,)+args))
File "C:\Users\annah\AppData\Local\Temp\pip-build-env-ypoc6x0n\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\annah\AppData\Local\Temp\pip-install-3ny_gyvy\numpy_14bbbc1178314af585e7fa52bdb25a09\numpy\distutils\command\config.py", line 105, in _compile
src, obj = self._wrap_method(old_config._compile, lang,
File "C:\Users\annah\AppData\Local\Temp\pip-install-3ny_gyvy\numpy_14bbbc1178314af585e7fa52bdb25a09\numpy\distutils\command\config.py", line 96, in _wrap_method
ret = mth(*((self,)+args))
File "C:\Users\annah\AppData\Local\Temp\pip-build-env-ypoc6x0n\overlay\Lib\site-packages\setuptools\_distutils\command\config.py", line 132, in _compile
self.compiler.compile([src], include_dirs=include_dirs)
File "C:\Users\annah\AppData\Local\Temp\pip-build-env-ypoc6x0n\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 401, in compile
self.spawn(args)
File "C:\Users\annah\AppData\Local\Temp\pip-build-env-ypoc6x0n\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 505, in spawn
return super().spawn(cmd, env=env)
File "C:\Users\annah\AppData\Local\Temp\pip-install-3ny_gyvy\numpy_14bbbc1178314af585e7fa52bdb25a09\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.

It was indeed an incompatibility between the versions of numpy and Python. To set up a virtual environment with a specific version of Python it was necessary to install that version of Python on the machine globally and then start it up with "py -3.9" Then use virtualenv to create the virtual environment.

Related

Why does the MinGW bundled with CLion disables LTO (Link Time Optimization)?

I found the recent version of CLion come bundled with MinGW. However, it seems that LTO (Link Time Optimization) is disabled (--disable-lto). Could anyone tell me why? Thx.
C:\Program Files\JetBrains\CLion 2021.1\bin\mingw\bin>gcc -v
Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-w64-mingw32
Configured with: ../gcc-11.2.0/configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --build=x86_64-alpine-linux-musl --prefix=/win --enable-checking=release --enable-fully-dynamic-string --enable-languages=c,c++ --enable-libatomic --enable-libgomp --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --enable-seh-exceptions --enable-shared --enable-static --enable-threads=posix --enable-version-specific-runtime-libs --disable-bootstrap --disable-graphite --disable-libada --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-libquadmath --disable-lto --disable-nls --disable-multilib --disable-rpath --disable-symvers --disable-werror --disable-win32-registry --with-gnu-as --with-gnu-ld --with-system-libiconv --with-system-libz --with-gmp=/win/makedepends --with-mpfr=/win/makedepends --with-mpc=/win/makedepends
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.2.0 (GCC)
We made it pretty minimal to be able to compile simple projects like "Hello, world!" and that's it. It also does not include any tooling like MSYS2, so it's even not possible to install additional development libraries there.

Buildroot and Crosstool-NG configuration error

Building a root filesystem on Buildroot for a Beaglebone Black target. Using a crosstool-NG toolchain with buildroot and I am getting this error in buildroot:
>>> toolchain-external-custom Configuring
Incorrect selection of kernel headers: expected 4.2.x, got 4.20.x
john#vmpc:/home/emmet/Downloads/crosstool-ng-1.24.0$ arm-cortex_a8-linux-gnueabihf-gcc -v
Using built-in specs.
COLLECT_GCC=arm-cortex_a8-linux-gnueabihf-gcc
COLLECT_LTO_WRAPPER=/home/emmet/x-tools/arm-cortex_a8-linux-gnueabihf/libexec/gcc/arm-cortex_a8-linux-gnueabihf/8.3.0/lto-wrapper
Target: arm-cortex_a8-linux-gnueabihf
Configured with: /home/emmet/Downloads/crosstool-ng-1.24.0/.build/arm-cortex_a8-linux-gnueabihf/src/gcc/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=arm-cortex_a8-linux-gnueabihf --prefix=/home/emmet/x-tools/arm-cortex_a8-linux-gnueabihf --with-sysroot=/home/emmet/x-tools/arm-cortex_a8-linux-gnueabihf/arm-cortex_a8-linux-gnueabihf/sysroot --enable-languages=c,c++ --with-cpu=cortex-a8 --with-fpu=vfpv3 --with-float=hard --with-pkgversion='crosstool-NG 1.24.0' --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath --disable-libquadmath-support --disable-libsanitizer --disable-libmpx --with-gmp=/home/emmet/Downloads/crosstool-ng-1.24.0/.build/arm-cortex_a8-linux-gnueabihf/buildtools --with-mpfr=/home/emmet/Downloads/crosstool-ng-1.24.0/.build/arm-cortex_a8-linux-gnueabihf/buildtools --with-mpc=/home/emmet/Downloads/crosstool-ng-1.24.0/.build/arm-cortex_a8-linux-gnueabihf/buildtools --with-isl=/home/emmet/Downloads/crosstool-ng-1.24.0/.build/arm-cortex_a8-linux-gnueabihf/buildtools --enable-lto --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --enable-threads=posix --enable-target-optspace --enable-plugin --enable-gold --disable-nls --disable-multilib --with-local-prefix=/home/emmet/x-tools/arm-cortex_a8-linux-gnueabihf/arm-cortex_a8-linux-gnueabihf/sysroot --enable-long-long
Thread model: posix
gcc version 8.3.0 (crosstool-NG 1.24.0)
Any idea how to fix this?
When using a custom external toolchain in Buildroot you have to tell Buildroot which kernel headers have been used to build the toolchain.
Just enter make menuconfig -> Toolchain -> External toolchain kernel headers series to set it.

how to fix: /bin/ld: cannot find -lgfortran error: ld returned 1 exit status

I am trying to compile a Fortran code (package) with gfortran in a Linux server, on which I have no root access.
It has a Makefile and when I run make I get this error
/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status
but gcc is already installed on cluster.
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)
or libgfortran:
locate libgfortran
/usr/lib/libgfortran.so.3.0.0
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/libgfortran.so
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/libgfortran.spec
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/libgfortranbegin.a
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/32/libgfortran.a
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/32/libgfortran.so
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/32/libgfortranbegin.a
/usr/lib64/libgfortran.so.1
/usr/lib64/libgfortran.so.1.0.0
/usr/lib64/libgfortran.so.3
/usr/lib64/libgfortran.so.3.0.0
/usr/share/doc/gcc-gfortran-4.8.5/ChangeLog-2002.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.8.5/ChangeLog-2003.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.8.5/ChangeLog-2004.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.8.5/ChangeLog-2005.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.8.5/ChangeLog-2006.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.8.5/ChangeLog-2007.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.8.5/ChangeLog-2008.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.8.5/ChangeLog-2009.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.8.5/ChangeLog-2010.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.8.5/ChangeLog-2011.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.8.5/ChangeLog-2012.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.8.5/ChangeLog.libgfortran.bz2
and this is the output of installed package
yum list gcc-gfortran
Failed to set locale, defaulting to C
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Installed Packages
gcc-gfortran.x86_64 4.8.5-16.el7 #local-rhels7.4-x86_64--install-rhels7.4-x86_64
The question is why it can not find libgfortran, while gcc is installed?
I have also tried to update $PATH but it did not change anything.
I am just a user of the server without root access.

ubuntu12.04 netcdf compile error gcc: error: unrecognized option '-V'

I'm trying to install netcdf (pgi vervion) in the Ubuntu-12.04 with gcc-4.6. However, when I configure ./configure FC=pgf90 CC=gcc CXX=g++ --prefix=$HOME/netcdf-pgi, the errors show this:
configure:3986: $? = 0
configure:3993: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configure:3997: $? = 0
configure:4004: gcc -V >&5
gcc: error: unrecognized option '-V'
gcc: fatal error: no input files
compilation terminated.
If you want to compile netcdf with the PGI (Portland group) compilers, then you should use those tools:
PGF77 , PGFORTRAN , PGC++ and PGCC
In this link is a guide to build and install it correctly. Portland Group NETCDF 4.11 Build guide

gcc can't build 32bit program in 64bit RHEL6?

I have installed gcc-4.6.2 from source, but it can't build 32bit program, it seemed doesn't have 32bit lib. error report by gcc:
/usr/local/gcc-4.6.2/lib/gcc/x86_64-redhat-linux/4.6.2/crtbegin.o: could not read symbols: File in wrong format
my gcc-4.6.2 config is:
Target: x86_64-redhat-linux
Configured with: ../gcc-4.6.2/configure --prefix=/usr/local/gcc-4.6.2 --mandir=/usr/share/man --infodir=/usr/share/info --enable-bootstrap --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --enable-languages=c,c++ --with-gmp=/usr/local/gmp-5.0.1 --with-mpfr=/usr/local/mpfr-2.4.2 --with-mpc=/usr/local/mpc-1.0.1 --without-ppl --without-cloog --with-arch-32=i686 --build=x86_64-redhat-linux --disable-multilib
Thread model: posix
Configure and build gcc with:
--enable-multilib --with-multilib-list=m32,m64
Once you install it, you can then compile for 32-bit by passing the "-m32" option to gcc. Note that you will also need 32-bit versions of all needed libraries (like glibc.)

Resources