Issue with openssl configuration

I am getting an error : result false
info ImportError: cannot import name ‘OPENSSL_VERSION_NUMBER’ from ‘_ssl’ (unknown location)
}
I am using python3.8 and while installing the version of python, I am getting an error:
checking for pkg-config… /bin/pkg-config
checking for openssl/ssl.h in /usr/local/ssl… no
checking for openssl/ssl.h in /usr/lib/ssl… no
checking for openssl/ssl.h in /usr/ssl… no
checking for openssl/ssl.h in /usr/pkg… no
checking for openssl/ssl.h in /usr/local… no
checking for openssl/ssl.h in /usr… no

but when looking for openssl version -a
[admin@moh-central-nso-02 ~]$ openssl version -a
OpenSSL 1.1.1g FIPS 21 Apr 2020
built on: Thu Mar 25 16:46:53 2021 UTC
platform: linux-x86_64
options: bn(64,64) md2(char) rc4(16x,int) des(int) idea(int) blowfish(ptr)
compiler: gcc -fPIC -pthread -m64 -Wa,–noexecstack -Wall -O3 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wa,–noexecstack -Wa,–generate-missing-build-notes=yes -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DZLIB -DNDEBUG -DPURIFY -DDEVRANDOM=“"/dev/urandom"” -DSYSTEM_CIPHERS_FILE=“/etc/crypto-policies/back-ends/openssl.config”
OPENSSLDIR: “/etc/pki/tls”
ENGINESDIR: “/usr/lib64/engines-1.1”
Seeding source: os-specific
engines: rdrand dynamic

What could be the possible issue and solution

You must tell python’s configure where you have installed openssl.