0

I have a python script that I need to execute using a C# program via the IronPython framework. When I try it, I got an error saying "no module named pylink". I figured pip install of the libraries doesn't apply to IronPython, so I manually downloaded the library and gave a path to the library. I did this for multiple libraries and this seems to get rid of the errors till I got this error "No module named _psutil_windows".

I looked and can't find a library called "_psutil_windows" online. I looked in the python installations' lib folder and found a c file, but that doesn't seem to solve this issue. Please look at the screenshot below:

Error Pic

I never wrote py script. Please excuse my stupid question.

1 Answer 1

0

_psutil_windows is the native binary module of the psutil library. You can see it in your screenshot, named _psutil_windows.cp310-win_amd64.pyd – the rest of it means it's compiled for CPython 3.10 on x64 processors.

In other words, it's not something you can run in .NET, under IronPython.

If you can edit the Python script you're attempting to run (or the library that eventually requires psutil) to not require psutil, that might work.

3
  • So I didn't write the python script. Not sure if that's possible. Let's just say it's not, then the only way to execute it is by using python.exe instead of IronPython? Commented May 31, 2022 at 16:18
  • Python.exe, or by embedding the Python interpreter DLL.
    – AKX
    Commented Jun 1, 2022 at 9:02
  • I went with Python.exe. Thank you. Commented Jun 2, 2022 at 15:22

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.