Closed L-Vignali closed 5 months ago
Hi @L-Vignali,
This build error seems to indicate that the <complex.h>
header isn't available or can't be found in your Visual Studio installation. I haven't been able to reproduce this error locally. Can you manually verify whether the complex.h
header exists? It should be under the directory C:\Program Files (x86)\Windows Kits\{version number}\Include\{version number}\ucrt
.
Hi Joshua, thanks for the quick reply. yes, the file is there: C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\complex.h Type: C Header Source File
Have you tried updating setuptools
using pip install setuptools --upgrade
before building and installing pycatch22?
Yes, done that…
It seems to building without errors in our Windows test environment (running python 3.10). Has this issue appeared only after updating to the latest release of pycatch22 (v0.4.5)? If you were previously using an older version (e.g., v0.4.4), did the installation succeed without any errors?
Unfortunately it was the first installation. Also older version fail to compile. Is it possible is something related to permissions? I made sure I have full permissions for complex.h but if it happens somewhere before it is difficult for me to tell.
@L-Vignali I've pulled down latest and built a fresh wheel distribution in a clean Windows environment and uploaded it to the PyPI index. Can you give this a try and let me know how it goes? If you run pip install pycatch22
it should now pull the pre-built Windows distribution and install this instead.
Problem solved! Thank you so much Joshua!
Hi everyone, I am getting this mistake in windows visual studio and python 3.10.4. The same mistake happens when manually trying to install (i.e, C:\Users\lvignali\Desktop\toolboxes\pycatch22-0.4.5>python setup.py build).
C:\Users\lvignali>pip install pycatch22 Defaulting to user installation because normal site-packages is not writeable Collecting pycatch22 Using cached pycatch22-0.4.5.tar.gz (50 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: pycatch22 Building wheel for pycatch22 (pyproject.toml) ... error error: subprocess-exited-with-error
× Building wheel for pycatch22 (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [27 lines of output] running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-310 creating build\lib.win-amd64-cpython-310\pycatch22 copying src\pycatch22\catch22.py -> build\lib.win-amd64-cpython-310\pycatch22 copying src\pycatch22__init__.py -> build\lib.win-amd64-cpython-310\pycatch22 running egg_info writing src\pycatch22.egg-info\PKG-INFO writing dependency_links to src\pycatch22.egg-info\dependency_links.txt writing top-level names to src\pycatch22.egg-info\top_level.txt reading manifest file 'src\pycatch22.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE' writing manifest file 'src\pycatch22.egg-info\SOURCES.txt' running build_ext building 'catch22_C' extension creating build\temp.win-amd64-cpython-310 creating build\temp.win-amd64-cpython-310\Release creating build\temp.win-amd64-cpython-310\Release\src creating build\temp.win-amd64-cpython-310\Release\src\C "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Isrc\C "-IC:\Program Files\Python310\include" "-IC:\Program Files\Python310\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" /Tcsrc\C\CO_AutoCorr.c /Fobuild\temp.win-amd64-cpython-310\Release\src\C\CO_AutoCorr.obj -std=c99 cl : Command line warning D9002 : ignoring unknown option '-std=c99' CO_AutoCorr.c src\C\CO_AutoCorr.c(5): fatal error C1083: Cannot open include file: 'complex.h': No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe' failed with exit code 2 [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pycatch22 Failed to build pycatch22 ERROR: Could not build wheels for pycatch22, which is required to install pyproject.toml-based projects