1

While executing an external Python script which imports numpy module via IronPython in C#, Visual Studio, I get a module not found error of numpy.

Tried to copy the numpy directory from my local python folder it causes an error cannot load library.

import time
import imutils
from imutils.video import VideoStream
from os import listdir, path, makedirs
import cv2
import os
import tkinter as tk
from tkinter.font import Font
from tkinter import *

In C#:-

v.ExecuteFile("D:\\test1.py");

Expected the code to run but throws a module not found error /a library error
  • If you use numpy for CPython this can't work. See https://stackoverflow.com/a/6855367 – Michael Butscher Jun 12 '19 at 11:29
  • @MichaelButscher Can you please elaborate? IronClad in our context doesn't seem to work – Shubham Tawde Jun 12 '19 at 11:46
  • Compiled modules like numpy need the appropriate API environment to work. If compiled for CPython implementation they won't work for IronPython without special measures like IronClad. There seems to exist no up to date numpy for IronPython. See https://stackoverflow.com/a/51956719 – Michael Butscher Jun 12 '19 at 13:43

0 Answers0