About Us Knowledge Base Community Forum Electronics Toolbox FAQ Shipping & Delivery

Community Forum

Share your projects and post your questions

Register or Sign In

ImportError: No module named 'ow' Python 3.5.3

2516 Views - Created 26/04/2018


Posted by:

Last edited: 26/04/2018

Users Avatar


I started a project in Pyton 3. I use Tkinter to make a graphical interface of my project. I use a Raspberry. I want to use 1-wire to control sensors, so I use owfs with i2c.

After exchanging wih someone, he told me that Python 3 did not use the right way to find "ow".

Then I decided to try Python 2 and it seems to work. A different error appears.

I use this code for test :

import ow
for sensor in sensorlist:
     print('Device Found')
     print('Address:' + sensor.address)
     print('Family:' + sensor.family)
     print('ID:' + sensor.id)
     print('Type:' + sensor.type)


In Python 2 the error comes from ow.init line 224 "Raise exNoController".

My problem is that I want to use "ow" in python 3 but i can't access it. Do you have an idea to solve my problem ?

Maybe I've to use : python3 -m pip install ****** ? I should replace the stars by ?






Posted by:

Users Avatar

United Kingdom

Users Twitter  Users Website  


The Raise exNoController error is probably being caused by the owserver not running.  There is a thread in this forum post  with someone else who had the same problem and a way to fix it.  Hopefully this is the same problem you are having.

python-ow is not available in Python 3 but it is possible to access the 1 wire sensors directly through the file system.  The code below shows how to mount owfs using a subprocess call and then read the temperature from a sensor by accessing it directly through the file system.  You would need to update the Sensor1 variable to point to the path of your 1 wire sensor.  This method should work with python 2 and 3.

import os
import subprocess
import time

# mount owfs
subprocess.call(["owfs", "--i2c=ALL:ALL", "--allow_other", "/mnt/1wire/"])

# 1 wire temperature sensors
Sensor1 = "/mnt/1wire/10.BA7392020800/temperature"

varSensor1Value = 0.0

def get_1wire_sensor(path):
    # Function to read 1-Wire sensors using OWFS
        f = open(path, "r")
        text = f.readlines()
        return float(text[0]) + 3
        print("getwiretemp failed")
    return 88

while (True):
    varSensor1Value = get_1wire_sensor(Sensor1)


AB Electronics UK Tech Support


Posted by:

Users Avatar

Hi Andrew,

Thanks for the support.


I've test your code and i think that will solve my problem, but now, there is actually this problem with owserver... i get "getwiretemp failed 88" when i execute the code.

I've follow all your tutorial but i've problem when i write this command: sudo /opt/owfs/bin/owserver -c /etc/owfs.conf --pid-file /var/run/owfs/owserver.pid

It shows me an error: sudo: /opt/owfs/bin/owserver : command not found.

Where's the problem ?





Posted by:

Users Avatar


Many thanks for your help, that has fixed the problem.

I found the second problem, i forgot to change the sensor "Sensor1" That's why there was this problem.


Thanks a lot for your help !



Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view, download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.