Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

ImportError: No module named 'pytuya' #53

Open
RR2301 opened this issue Jun 14, 2019 · 4 comments
Open

ImportError: No module named 'pytuya' #53

RR2301 opened this issue Jun 14, 2019 · 4 comments

Comments

@RR2301
Copy link

RR2301 commented Jun 14, 2019

I am trying to run python program in raspberrypi3. but it gives following error.
pi@raspberrypi:/usr/lib/python3.5 $sudo python3 Test2.py Traceback (most recent call last): File "Test2.py", line 3, in <module> import pytuya ImportError: No module named 'pytuya'
Just FYI, I already installed pytuya module
pi@raspberrypi:/usr/lib/python3.5 $ pip3 install pytuya==7.0.2 Collecting pytuya==7.0.2 Using cached https://www.piwheels.org/simple/pytuya/pytuya-7.0.2-py3-none-any.whl Collecting pyaes (from pytuya==7.0.2) Using cached https://www.piwheels.org/simple/pyaes/pyaes-1.6.1-py3-none-any.whl Installing collected packages: pyaes, pytuya Successfully installed pyaes-1.6.1 pytuya-7.0.2
Appreciate your quick help!
Note : My overall objective is to control tuya switch from Openhab panel.

@alex-phillips
Copy link

Also getting this error in my Home-Assistant setup

@clach04
Copy link
Owner

clach04 commented Jun 16, 2019

@RR2301 from your report it doesn't look like the module is installed globally for the root user. It looks like it is only installed locally.

Try installing for root, e.g.

sudo pip3 install .....

@alex-phillips
Copy link

My issue was there was a change in the Home-Assistant software in how I specified required modules. So it was also a pip user install issue for me, now fixed.

Love the project, BTW. Great job!

@qntris
Copy link

qntris commented Mar 23, 2020

@alex-phillips , can you elaborate a bit more on this - I am also getting that import error for "No module named 'pytuya'", although the module is in the same folder. Can you share your steps for making it work?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants