To rectify the 'openssl/err.h'
: No such file or directory error encountered while using aioquic on Windows, follow these steps:
-
Environment Variable Configuration:
-
Identify OpenSSL Installation Directories:
- Execute
choco list openssl
to locate the installation directory, typically found atC:\ProgramData\chocolatey\lib\openssl\tools\mingw64\include
. - Find the library directory at
C:\ProgramData\chocolatey\lib\openssl\tools\mingw64\lib
.
- Execute
-
Set Environment Variables:
- Open an elevated command prompt.
- Set the
INCLUDE
variable to point to the OpenSSL include directory:
setx INCLUDE "C:\ProgramData\chocolatey\lib\openssl\tools\mingw64\include" /M
- Set the
LIB
variable to point to the OpenSSL library directory: - Close and reopen the command prompt for changes to take effect.
setx LIB "C:\ProgramData\chocolatey\lib\openssl\tools\mingw64\lib" /M
-
Identify OpenSSL Installation Directories:
If setting environment variables alone is insufficient, explicitly specify compiler flags during installation:
pip install -e . CFLAGS=-I/path/to/openssl/include LDFLAGS=-L/path/to/openssl/lib
Replace /path/to/openssl/include
and /path/to/openssl/lib
with the actual directories.
Consider uninstalling and reinstalling OpenSSL using Chocolatey to ensure proper directory structure and environment variables:
choco uninstall openssl choco install openssl