Open namebee opened 4 years ago
Are you sure that all requirements are installed? It's complaining that it can't find logbook
which is listed as a requirement.
Yes, Everything is installed. If I comment out import logbook
it complains about OpenSSL not being there.
Maybe you have installed the dependencies for a different Python installation from the one used in WeeChat? Try to run these commands in Weechat to check:
/python eval import sys; print(sys.path)
/plugin listfull python
How to fix this?
/python eval import sys; print(sys.path) gives:
['/Users/myaccount/.local/share/weechat/python', '/usr/local/Cellar/weechat/3.3_1/share/weechat/python', '',
│ | '/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/lib/python310.zip',
│ | '/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/lib/python3.10',
│ | '/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/lib/python3.10/lib-dynload',
│ | '/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages']
and /plugin listfull python gives:
│00:00:43 |
│00:00:43 | python [v3.3]: Support of python scripts (/usr/local/Cellar/weechat/3.3_1/lib/weechat/plugins/python.so)
│00:00:43 | written by "Sébastien Helleu <flashcode@flashtux.org>", license: GPL3
│00:00:43 | commands hooked:
│00:00:43 | /python (list/load/unload scripts)
│00:00:43 | signals hooked:
│00:00:43 | signal: debug_dump
│00:00:43 | signal: debug_libs
│00:00:43 | signal: python_script_install
│00:00:43 | signal: python_script_remove
│00:00:43 | signal: python_script_autoload
│00:00:43 | completions hooked:
│00:00:43 | python_script
@realisation: Have you run pip install -r requirements.txt
? If so, what does pip list -v
output?
Same issue all dependencies installed
@realisation: Have you run
pip install -r requirements.txt
? If so, what doespip list -v
output?
I made a gist to show the output since its fairly verbose -
https://gist.github.com/realisation/ee4558615347e0d867c9e7d3f37358cb
@realisation: So WeeChat is using the Python install in /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10
, but pip is using the one in /usr/local/anaconda3/lib/python3.8
. You have to either install the packages in /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10
(you could try using /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/bin/pip
), use a virtualenv, or run WeeChat against the Python in /usr/local/anaconda3/lib/python3.8
.
@bimawa: You likely have a similar issue. Make sure you have installed the dependencies in the Python installation that WeeChat is using. You can check which Python installation WeeChat uses with /python eval import sys; print(sys.path)
.
@trygveaa Yes its helped!
/python eval import sys; print(sys.path)
: return /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/lib/python3.10
I did /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/bin/pip3.10 install -r requirements.txt
after /script load matrix.py
I got new issue :(
But that looks like the other question?
@bimawa: That last error is reported in #293. Seems like a bug in Python 3.10.
Oh. ok thanks a lot!
I also get this error.
I installed the requirements.txt under a virtualenv within ~/.weechat/python/venv/
Python version within weechat: /python version
gives python: 3.10.4
command line python version: $ python --version
Python 3.10.4
I did an /upgrade
within weechat incase something had to be loaded from a previous update and still get the same error:
I link my main.py
from my weechat-matrix git cloned dir to my ~/.weechat/python/matrix.py
file.
here is the error within weechat:
python: stdout/stderr (?): Traceback (most recent call last):
python: stdout/stderr (?): File "/mnt/wd1000/BTSync/RPi conf files/weechat/python/matrix.py", line 41, in <module>
python: stdout/stderr (?): import logbook
python: stdout/stderr (?): ModuleNotFoundError: No module named 'logbook'
python: unable to parse file "/mnt/wd1000/BTSync/RPi conf files/weechat/python/matrix.py"```
thanks for any help to try and to get weechat-matrix loaded!
To add info from previous questions, see my pip list -v
attached file..
weechat_matrix.pip.show.txt
Would love to get weechat-matrix working! Thanks for any help ahead of time...
To add info from previous questions, see my
pip list -v
attached file.. weechat_matrix.pip.show.txtWould love to get weechat-matrix working! Thanks for any help ahead of time...
does your distro have a python logbook? on my system i solved with apt install -y python3-logbook distros manage to fix some of python's dumpster fire
It does now.. I haven't looked at this since submitting my comment back in June 2022.. But now it doesn't list Logbook
under pip (maybe it was removed with some kind of update.. or I removed it not sure) but now the pkg is available under pacman
and I installed the packages through it and any other requirements/dependencies and it now works! Thanks for the shove/bump as it made me re-look at it and now loads in weechat after these few steps..
ModuleNotFoundError: No module named 'logbook'
This is my first time using Weechat, I'm on Python 3.8.3 and I have all requirements installed. No clue why this isn't working.
I'll gladly give more info, I'm not sure what info you guys need though.
Edit: I've checked now that this happens for all modules, Not just logbook.