Docker Community Forums

Share and learn in the Docker community.

Install python netifaces module in winamd64/python:3.8

Hi, im new to docker.
i have an issue and i hope sombody coud give me a hint to solve that.

I try to install some python requirements in my docker image

winamd64/python:3.8

thats works fine so far but one module dosn’t work.

when i try to install netifaces i get the following error

building 'netifaces' 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/

i tried to install a newer C++ Build tools but it dindt worked eather
(Installieren von Visual Studio Build Tools in einem Container | Microsoft Docs)

i tried to copy the weel of netifaces in the docker and install it manualy but that also didn’t worked

Does anyone have any tip for me on how I could get this to work?

i managed to make it work. --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended made the difference

ADD https://aka.ms/vs/16/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe

RUN C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache `

--installPath C:\BuildTools `
--add Microsoft.VisualStudio.Workload.AzureBuildTools `
--remove Microsoft.VisualStudio.Component.Windows10SDK.10240 `
--remove Microsoft.VisualStudio.Component.Windows10SDK.10586 `
--remove Microsoft.VisualStudio.Component.Windows10SDK.14393 `
--remove Microsoft.VisualStudio.Component.Windows81SDK `
--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended `

|| IF “%ERRORLEVEL%”==“3010” EXIT 0