Pulse-Eight / libcec

USB CEC Adapter communication Library http://libcec.pulse-eight.com/
Other
721 stars 290 forks source link

pyCecClient.py Error module 'cec' has no attribute 'libcec_configuration' -- Ubuntu 19.10 #500

Open Electrik-rich546456 opened 4 years ago

Electrik-rich546456 commented 4 years ago

Hi I am really very new at all this and I have managed to teach myself as much as i can but I have a few issues I cannot find how to fix...

First question is if i compile this as per these instructions

and then if I compile using these instructions what happens to the first compiled cec.so (or cec.py or whatever extension) file used in python?

If i run sudo pip freeze I don't see cec but if i run pip freeze i see cec==0.2.7 If I run pip show cecI get .local/lib/python2.7/site-packages as its location. even though one of the compile output lines was Installing: /usr/local/lib/python3.7/dist-packages/cec.py What is going on?? why is system not using new one??

That leads me on to my next question

Where does the instructions fit into the main set.

'apt-get update apt-get install cmake libudev-dev libxrandr-dev python-dev swig git clone https://github.com/Pulse-Eight/libcec.git mkdir libcec/build cd libcec/build'

Does it go here ???????

'cmake .. make -j4 sudo make install sudo ldconfig'

========================== Update======================

I fixed it using synaptic package manager.

  1. Searched 'Pulse-Eight ' and mark for complete removal and rebooted
  2. Searched 'Pulse-Eight ' and installed all packages

However I still get this error.

<module 'cec' from '/home/user/.local/lib/python3.7/site-packages/cec.cpython-37m-x86_64-linux-gnu.so'>
Traceback (most recent call last):
  File "/home/user/Documents/Python works/pyCecClient.py", line 10, in <module>
    class pyCecClient:
  File "/home/user/Documents/Python works/pyCecClient.py", line 11, in pyCecClient
    cecconfig = cec.libcec_configuration()
AttributeError: module 'cec' has no attribute 'libcec_configuration'

How do i fix it ?????????????

jagofulford commented 4 years ago

I'm also having the same issue. Did you find a resolution for this?

mtullo27 commented 1 year ago

@jagofulford @Electrik-rich546456 I am also having this issue, have you found a solution?

jagofulford commented 1 year ago

I unfortunately never did find a fix.

On Mon, 27 Feb 2023, 9:42 pm Matthew Tullo, @.***> wrote:

@jagofulford https://github.com/jagofulford @Electrik-rich546456 https://github.com/Electrik-rich546456 I am also having this issue, have you found a solution?

— Reply to this email directly, view it on GitHub https://github.com/Pulse-Eight/libcec/issues/500#issuecomment-1447141065, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARWRTFSKPDECPKMZU6YWUE3WZUNVFANCNFSM4MCT5WHA . You are receiving this because you were mentioned.Message ID: @.***>

drolevar commented 1 year ago

Guys, you are all using cec which is installed via pip, it's a different library: https://github.com/trainman419/python-cec This script uses bindings built by libcec itself.

So you have to uninstall it via pip uninstall cec and then try running this script. If it doesn't, try building libcec from the source and installing it with sudo make install.