Closed michaelsjackson closed 4 years ago
hi! obvz-dir
is supposed to be the main obvz folder (that where obvz.py
file is located); it seems to me that you had set it to your org-brain directory instead? can you try setting it to ~/packages/obvz/
(it seems that's where you saved the obvz files)?
(also i'm not sure how load-library works, since i haven't packaged it properly yet I just load the elisp code with (load "~/path/to/obvz/obvz.el")
)
Oh, thanks, this step is solved but next problem.
Traceback (most recent call last):
File "obvz.py", line 7, in <module>
from PyQt5.QtWidgets import QPushButton, QApplication, QWidget
ModuleNotFoundError: No module named 'PyQt5'
But I thought I installed PyQt5, it seems not. I used these commands.
sudo apt-get install python3-pyqt5
sudo apt-get install python3-pyqt5.qtsvg
How could I investigate correct installation of pyqt5, in which directories which files should be for example? Ubuntu 16.04 xenial here.
Ok, I came further using:
pip3 install --user pyqt5
Now my error message looks as follows:
Traceback (most recent call last):
File "obvz.py", line 40, in <module>
from frucht_v3 import frucht
ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by /home/mj/packages/obvz/frucht_v3.so)
ah the lovely search for dependencies :) could it be a miniconda issue? I haven't used conda a lot, but iirc it has a separate package repo so idk how well it interacts with packages installed through apt.
maybe you can try conda install pyqt
(as well as for the other dependencies), or alternatively use a "normal" python version?
glibc 2.23 was released 2016-02-19
No I guess, maximum glibc is above for Ubuntu 16.04, and yours is a bit newer, 2.27.
glibc 2.27 was released 2018-02-01
Searching/Googling more, if there is any solution, can report back here, if I have something. Coming always closer :walking_man:
hmm the glib error seems to be due my c++ experiments where I cannot really say I understand all what's going on in the background. what i see on google is mostly the suggestion to upgrade to 18.04, but if you want to tinker with c++, eigen and pybind you could also try to compile the frucht_v3.cpp file on your system (the command i use is in the README).
How could I activate the non-cpp, slower version, if possible? Better than nothing.
Installed pybind:
pip3 install pybind11
I tried compiling with eigen installation
sudo apt install libeigen3-dev
But still complains:
./frucht_v3.cpp:2:23: fatal error: Eigen/Dense: No such file or directory
compilation terminated.
Came further using, added -I /usr/include/eigen3:
g++ -O3 -Wall -shared -std=c++17 -fPIC
python3 -m pybind11 --includes-I /usr/include/eigen3 ./frucht_v3.cpp -o ./frucht_v3.so
But now getting some c++ errors.
./frucht_v3.cpp: In function ‘void update_dists(std::vector<std::pair<int, int> >, Eigen::Ref<Eigen::Matrix<float, -1, -1> >, Eigen::Ref<const Eigen::Matrix<float, -1, -1> >, Eigen::Ref<const Eigen::Matrix<float, -1, -1> >, int*)’:
./frucht_v3.cpp:275:27: error: ‘isnan’ was not declared in this scope
i think (it's been a while) i used the eigen version from the eigen website since ubuntu repos always lag a bit behind. there's unfortunately no slower version anymore, after I saw what a speedboost c++ was I only implemented new features there.
No problem, thanks, I can try with the other Eigen then.
Do you have any guess, if this could be an error because of older/wrong Eigen version?
error: ‘isnan’ was not declared in this scope
Installed latest Eigen, c++ error is less, meaning still no success, looks as follows:
g++ -O3 -Wall -shared -std=c++17 -fPIC `python3 -m pybind11 --includes` -I /usr/local/include/eigen3 ./frucht_v3.cpp -o ./frucht_v3.so
./frucht_v3.cpp: In function ‘void update_dists(std::vector<std::pair<int, int> >, Eigen::Ref<Eigen::Matrix<float, -1, -1> >, Eigen::Ref<const Eigen::Matrix<float, -1, -1> >, Eigen::Ref<const Eigen::Matrix<float, -1, -1> >, int*)’:
./frucht_v3.cpp:275:27: error: ‘isnan’ was not declared in this scope
if (isnan(new_dist)) {
^
./frucht_v3.cpp:275:27: note: suggested alternative:
In file included from /usr/include/c++/5/complex:44:0,
from /usr/local/include/eigen3/Eigen/Core:28,
from /usr/local/include/eigen3/Eigen/Dense:1,
from ./frucht_v3.cpp:2:
/usr/include/c++/5/cmath:641:5: note: ‘std::isnan’
isnan(_Tp __x)
^
Tried enough for today, I can continue another time. Thanks for all your help.
Tried one more thing, replacing isnan by something else, then it compiles, copied to obvz directory, window opens, but then I am getting other emacs errors.
Debugger entered--Lisp error: (error "Not in org-mode or org-brain-visualize")
signal(error ("Not in org-mode or org-brain-visualize"))
error("Not in org-mode or org-brain-visualize")
org-brain-entry-at-pt()
(obvz-get-node-name (org-brain-entry-at-pt))
Probably I should try with simpler brains first?
no problem :) thanks for the detailed reports! i don't think it's related to eigen since isnan is afaik basic c++ functionality, maybe g++ works different between ubuntu versions. i'd try next std::isnan
instead of just isnan
, for me (18.04) it makes no difference but perhaps it's required on 16.04.
std::isnan did it thanks. Now I can be sure at least I have a correct .so file, can investigate more, why now in emacs I am getting those errors, and how I can bypass those, somehow.
When the QApplication window appears, it is empty here always, message is as follows in emacs:
QApplication: invalid style override 'gtk' passed, ignoring it.
Available styles: Windows, Fusion
Hey, it worked, success! Thanks a lot.
This time, I started org-brain-visualize first, then started obvz, hitting n and voila, window is filled with all those entries, my brain has more than 2000 .org files, cool, can play around now.
The above marathon was worth it in the end :kangaroo:
Tried svg export, it works as well, great. This issue can be closed if you want.
For installing obvz I set four parameters:
Then when running:
M-x obvz-start
I am getting following error:
/home/mj/miniconda3/bin/python: can't open file 'obvz.py': [Errno 2] No such file or directory
What I could try? Thanks in advance. My python3 is there. At least this python is used when updating pip3, for example.
python --version gives:
Python 3.7.4