[BETA] Lutron Caseta Integration using Raspberry Pi (Pro or Standard Bridge) [DEPRECATED--See new Release thread instead]

How did you install Twisted and Paramiko after Python 2.7?

I’m sorry, you are going to have to be more specific. Firstly what OS are you installing this on? Judging by your previous posts you have both Apple and Windows devices. If windows then see my early posts near the top of this string and let me know if you have any questions.

Sorry at work so sneaking and doing it remotely lol. I am installing on a windows7 x64 machine. got python 2.7 installed
but when I tried to do a pip install Twisted in the python cmd shell it errors out at install. I did install pywin32 also.

Great, well there are a few things to keep in mind.

  • If you installed any other versions of python (including the 32bit versions). Remove them ALL (including 2.7 64 bit) and then reinstall 2.7 64bit.
  • Then install pypiwin32…ensure it is the right version of this as well…(pypiwin32-219.win-amd64-py2.7.exe)
  • You may receive an error installing pypiwin but everything still worked for me anyway
  • pip install twisted
  • pip install paramiko

Thanks I will just remove everything and start fresh. Will do this later this evening and keep you posted. Thanks for your help.

In case you missed it, @njschwartz released the 1.0 version. Once you get python and everything set up, make sure to use those device handlers and script! [Deprecated] Lutron Caseta Connect V1.5

Yeah I saw that this morning. Will definitely do that . I have the non pro so picos is out of play for now for me.

I have started from fresh, Installed python 2.7 64bits and pypiwin32-219.win-amd64-py2.7.exe.
still get syntax error when I run "pip install twisted from python cmd…what am i doing wrong?

Post full error. Someone with python experience might be able to tell you what’s wrong.

Will do so in a few. Restoring the PC back to factory.

LOL i was running it from the shell, just realise I have to run it from the cmd prompt from the python directory

Aw well running it from C;\python27\scripts ( pip is not recognised as a command…)

You can (and should) add the python bin directory to your path. I believe there is an option to do that during the install, but you can also do it post-install - the method varies depending on Windows version. That might help you with some of the problems in the future, too!

PS, just remember this whole process is a learning experience and the next time you do something it will be easier.

I did add it to my path. and I guess you misread, its still not installing from the cmd prompt

If the pip command is not recognized than either it’s not in path, you’re not in the right directory, or it it’s not installed. Do some googling and look around the various Python 2.7 directories to see if you can find it. If not it’s not hard to install…https://pip.pypa.io/en/stable/installing/#installing-with-get-pip-py

Yes I couldnt find pip in the script directory and am googling how to install it, will look into that link also. thanks

You’re right, I did misread or still am. Just to test, I downloaded python 2.7.13 on a clean machine I’ve got here, made sure pip was installed (as part of the python package) and that add to path was installed. I then, from a standard command prompt - not python, did pip install twisted:
C:\Users\mgust>pip install twisted
Collecting twisted
Downloading Twisted-17.1.0.tar.bz2 (3.0MB)
100% |################################| 3.0MB 201kB/s

Got error;
error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27

----------------------------------------

Command “c:\python27\python.exe -u -c “import setuptools, tokenize;file=‘c:\users\mgust\appdata\local\temp\pip-build-f6kfvc\twisted\setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record c:\users\mgust\appdata\local\temp\pip-mbnth6-record\install-record.txt --single-version-externally-managed --compile” failed with error code 1 in c:\users\mgust\appdata\local\temp\pip-build-f6kfvc\twisted\

So installed MS VC++ from http://aka.ms/vcpython27 (which redirected to microsoft) and then ran again:
C:\Users\mgust>pip install twisted
Collecting twisted
Using cached Twisted-17.1.0.tar.bz2
Requirement already satisfied: zope.interface>=3.6.0 in c:\python27\lib\site-packages (from twisted)
Requirement already satisfied: constantly>=15.1 in c:\python27\lib\site-packages (from twisted)
Requirement already satisfied: incremental>=16.10.1 in c:\python27\lib\site-packages (from twisted)
Requirement already satisfied: Automat>=0.3.0 in c:\python27\lib\site-packages (from twisted)
Requirement already satisfied: setuptools in c:\python27\lib\site-packages (from zope.interface>=3.6.0->twisted)
Requirement already satisfied: attrs in c:\python27\lib\site-packages (from Automat>=0.3.0->twisted)
Requirement already satisfied: six in c:\python27\lib\site-packages (from Automat>=0.3.0->twisted)
Installing collected packages: twisted
Running setup.py install for twisted … done
Successfully installed twisted-17.1.0

Edit: After running through the above, run “pip install pypiwin32” before running lutron python script.

1 Like

Thanks a million. I was using the python2.7 as stated and couldnt find pip anywhere…installing 2.7.13 and I see pip package included. will keep you guys updated

1 Like

I finally got twisted and Paramiko installed…getting a win32api error when I run the lutronpi.py script so will try to figure that out

Well that does explain things. I guess I should have written 2.7.x. Sorry for the confusion. The 2.7.13 version comes with pip where as 2.7 alone does not which is why you were having that issue.