Python function error: Windows Error Code : 126

Python function error: Windows Error Code : 126

VikSin
Not applicable
1,426 Views
1 Reply
Message 1 of 2

Python function error: Windows Error Code : 126

VikSin
Not applicable

[ FlexSim 22.2.0 ]

Hello,

I have problem with running external python command. My colleague has same command, same python code and doesn´t have any problem when running it.
testpy.py
Python code is simple, just counting two numbers together.

Can somebody help ? I will be grateful for any answer.Python_test.fsm
simple_python_method.pnguser_command.pngerror.png

0 Likes
Accepted solutions (1)
1,427 Views
1 Reply
Reply (1)
Message 2 of 2

VikSin
Not applicable
Accepted solution

Problem solved, after hundreds of tries and prayers. It seems that the problem is in setting correct windows PATH. I tried first with my actual python version, it not works but after uninstalling all my pythons version and reinstalling python 3.10 it seems to works.

1) I uninstall all my python versions from computer, then reinstall python 3.10 from original site: https://www.python.org.
2) I set my correct PATHS at settings-system-advanced system settings-environment variables
some good tutorial can be found here:
How to Add Python to PATH – Real Python