I am working on a python script. In the script I am running a powershell script using ntlm. I cannot use ntlm for production and kerberos is required.I am not able to install pykerberos or winkerberos.
winkerberos
Collecting winkerberos
Using cached winkerberos-0.9.1.zip (43 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: winkerberos
Building wheel for winkerberos (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for winkerberos (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [5 lines of output]
running bdist_wheel
running build
running build_ext
building 'winkerberos' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for winkerberos
Failed to build winkerberos
ERROR: Could not build wheels for winkerberos, which is required to install pyproject.toml-based projects
pykerberos
Collecting pykerberos
Using cached pykerberos-1.2.4.tar.gz (25 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pykerberos
Building wheel for pykerberos (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pykerberos (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [5 lines of output]
running bdist_wheel
running build
running build_ext
building 'kerberos' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pykerberos
Failed to build pykerberos
ERROR: Could not build wheels for pykerberos, which is required to install pyproject.toml-based projects
error: Microsoft Visual C++ 14.0 or greater is required. - I intalled this to fix the issue but still for winkerberos I am getting this. I was getting this error for pykerberos as well but after installation it doesn't show this error.
This is how I am connecting to winrm:
sess = winrm.Session(
remote_host,
auth=(remote_username, remote_password),
#server_cert_validation='ignore',
transport='ntlm'
)