Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Electrik-rich546456 opened this issue Apr 6, 2020 · 4 comments · May be fixed by #655

Comments

@Electrik-rich546456
Copy link

Electrik-rich546456 commented Apr 6, 2020

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
Copy link

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

@mtullo27
Copy link

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

@jagofulford
Copy link

jagofulford commented Feb 28, 2023 via email

@drolevar
Copy link

drolevar commented Apr 7, 2023

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.

@albfan albfan linked a pull request May 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants