All Questions
339 questions
0
votes
0
answers
47
views
How do I include the os module with IronPython 3.4 in my C# project, and also run a script?
I am attempting to use IronPython 3.4 with my C# / .NET MAUI project. As IronPython 3.4 is pretty new, I am not sure if there is much support for it yet.
As a part of experimentation, I am attempting ...
0
votes
1
answer
69
views
When i run inversetest.py in wpf app, I get error on predict model
When I run python code in c#, I get error on line of predict model but it run in python well. I used any way such as python.net, ironPython, Process,... but it did not work:
private void ...
0
votes
0
answers
73
views
Using ironpython from C# async-await causes the app to hang
From C# we have to call python function, in this case the nltk lib lemmatize function (which still has no good C# implementation). We call it like this:
private string Lemmatize(string word)
{
using (...
0
votes
0
answers
73
views
In .NET Framework how to use IronPython package with Python modules, eg: TensorFlow, Pandas, NumPy
My program is in .net framework which reads python script and tries to execute it using IronPython packages. In the python script, we are importing python modules (can be any python module). While ...
0
votes
1
answer
65
views
How to use iopen pyxl in C#?
Im creating a Windows Forms Project based on C# using python scripts. But when click the button, which should start a python script i have an error "No module named 'openpyxl'"
private void ...
0
votes
0
answers
38
views
Unhandled exception: When importing my Deep learning python code on C#
Heads Up:
I am using Visual Studio 2022
My python code consists of a machine learning model which is getting trained. So it has python libraries imported within the Python code (Ex: Import numpy as ...
1
vote
0
answers
79
views
How to integrate IronPython to run a embedded Python Script
I have 2 Python Scripts embedded into my C# Application. Essentially; 1 python script is a Decode Script and the other Script is to Encode. The idea that I have is; how can I execute these python ...
0
votes
1
answer
277
views
How can I get IronPython in C# to run a script that requires an active VENV? Is this possible?
I've installed IronPython 3.4 (https://github.com/IronLanguages/ironpython3/releases/tag/v3.4.1) and I'm trying to run several font-related python scripts that depend upon an active VENV (FontTools, ...
0
votes
2
answers
621
views
Trying to run Python Code on .NET using Ironpython
I am trying to run a simple python code using C# using Iron Python Package.
Why it throws the below error (attached in screenshot)
The code runs fine if i don't import libraries,
but it throws error ...
1
vote
1
answer
198
views
IronPython 3.4 with dotnet 6 facing problem
I am trying to create a sample dll with a function that adds two integer.
I created a dll for that.
Process to create the dll ===>
Used VS2022 and created dll with .Net core6
sample code used
...
1
vote
1
answer
137
views
Failed to import external libraries in IronPython
I want to run a Python application with IronPython.
This is the error:
Unhandled exception. IronPython.Runtime.Exceptions.ImportException: Cannot import name IntFlag
at Microsoft.Scripting.Runtime....
0
votes
0
answers
79
views
IronPython: no module named 'nltk'
i use ironPython last version 3.4.1 in Nuget (https://www.nuget.org/packages/IronPython/3.4.1#readme-body-tab)
so, i got simple .py file with that code (let's name it test.py):
import nltk
def ...
0
votes
1
answer
201
views
Getting an error when I run Python and scripts in LibreOffice\program directory from C# using IronPython
I want to run the python version and scripts that are in the libreoffice\program directory on Windows from C# in Visual Studio 2022 using the latest version of IronPython. The .py script runs fine at ...
0
votes
1
answer
50
views
IronPython3 Host throws "TypeErrorException: metaclass conflict" when inheriting from a .net class
I have the following C# type:
[PythonType]
public class ScriptBase
{
public virtual int TestMe()
{
return 11;
}
}
Then, I'm trying to create a class that inherits from ScriptBase ...
0
votes
0
answers
119
views
Why I get "cannot unpack" error with PythonNet but not with IronPython?
I tried to connect to socket with IronPython and everything worked. But, when I try with Python.Runtime I get Python.Runtime.PythonException: 'cannot unpack non-iterable ValueTuple[String,Int32] ...