Skip to content

Commit 9d6c033

Browse files
committed
Extend C extension warning for Windows
1 parent 8e8a9d7 commit 9d6c033

File tree

1 file changed

+5
-1
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/common

1 file changed

+5
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/common/CExtContext.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
import org.graalvm.shadowed.com.ibm.icu.impl.Punycode;
6060
import org.graalvm.shadowed.com.ibm.icu.text.StringPrepParseException;
6161

62+
import com.oracle.graal.python.builtins.PythonOS;
6263
import com.oracle.graal.python.builtins.objects.cext.capi.CApiContext;
6364
import com.oracle.graal.python.builtins.objects.cext.common.CExtCommonNodes.CheckFunctionResultNode;
6465
import com.oracle.graal.python.builtins.objects.cext.common.LoadCExtException.ApiInitException;
@@ -309,7 +310,10 @@ public static Object loadCExtModule(Node location, PythonContext context, Module
309310
String message = "Loading C extension module %s from '%s'. Support for the Python C API is considered experimental.";
310311
if (!runViaLauncher) {
311312
message += " See https://www.graalvm.org/latest/reference-manual/python/Native-Extensions/#embedding-limitations for the limitations. " +
312-
"You can suppress this warning by setting the context option 'python.WarnExperimentalFeatures' to 'false'";
313+
"You can suppress this warning by setting the context option 'python.WarnExperimentalFeatures' to 'false'.";
314+
}
315+
if (PythonOS.getPythonOS() == PythonOS.PLATFORM_WIN32) {
316+
message += " If loading binary wheels fails, please make sure you installed the latest Microsoft Visual C++ Redistributable from https://aka.ms/vs/17/release/vc_redist.x64.exe.";
313317
}
314318
getLogger().warning(message.formatted(spec.name, spec.path));
315319
}

0 commit comments

Comments
 (0)