IronLanguages / ironpython2

Implementation of the Python programming language for .NET Framework; built on top of the Dynamic Language Runtime (DLR).

Home Page:http://ironpython.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No module named os on Raspberry PI

hvilppu opened this issue · comments

Description

I get "No module named os" on Raspberry PI

Steps to Reproduce

  1. Install .Net to Raspberry pi
  2. run program as "dotnet xyz.dll"
  3. "No module named os" error

Python-script (Test.py) start as:

import os
import glob
import time
 
os.system('modprobe w1-gpio')
os.system('modprobe w1-therm')
 
base_dir = '/sys/bus/w1/devices/'
device_folder = glob.glob(base_dir + '28*')[0]
device_file = device_folder + '/w1_slave'

C# part is:

Microsoft.Scripting.Hosting.ScriptEngine pythonEngine =
               IronPython.Hosting.Python.CreateEngine();

Microsoft.Scripting.Hosting.ScriptSource pythonScript =
               pythonEngine.CreateScriptSourceFromFile("Test.py");
           pythonScript.Execute();

Found out that import os import glob i not needed here

Hey bro

Could you help me how to solve no module cv2?