вторник, 14 юли 2020 г.

How to install ML python libraries on Sabayon

Check you're running the correct python
$eselect-python list
Install pip
$sudo equo install dev-python/pip
Reinstall python-exec just in case
$sudo equo install dev-lang/python-exec
Install your packages with the --user option. Useful libraries:
numpy scipy pandas matplotlib seaborn pymc3
$python3.6 -m pip install numpy --user

To open a notebook, first install Jupyer and python notebook
$sudo equo install dev-python/notebook  dev-python/jupyter_client

Then start your notebook
$jupyter notebook

and choose New.

P.S. It seems that getting theano and pymc3 is quite tricky. In case you wonder what are the requirements for those two, it's hard to say. See here and here.  I had to reinstall
numpy scipy mkl theano pandas

And then I had to change my gcc to 7.3.0 because for some reason gcc-8.2.0 won't work with binutils-2.33.0 with the gcc -g option and will give the remarkably stupid error "Error: unknown .loc sub-directive `view". But that you could see only if you open the temporary c file, scroll all the way to the middle and see the actual error. In the jupyter notebook I could see only "import error" and "execution error". It took me about 5 hours to figure out the problem. Nice.

P.S. I also did
export MKL_THREADING_LAYER=GNU
I have no idea if it helped.

P.P.S. I also installed Anaconda, because I thought it would help. It didn't, but in case it doesn't start, this is the thing that helped me (source):

Edit : ".../anaconda3//lib/python3.7/site-packages/anaconda_navigator/api/external_apps/vscode.py"

Add the line :

DISTRO_NAME = None

on Line 159 and indent it in line with the if above it (Outside it)



понеделник, 6 юли 2020 г.

Working autoclicker for Gentoo or Sabayon

It took some time to find a working autoclicker for Sabayon. I tried the most popular ones, but oddly enough they didn't work. For example, xdotool doesn't start at all, giving some very weird error  (i.e. "xdotool: symbol lookup error: /lib64/libpthread.so.0: undefined symbol: __write_nocancel, version GLIBC_PRIVATE").
What worked for me is xAutoclick (https://sourceforge.net/projects/xautoclick/). You have to do
$./configure
$./make
$sudo make install
And then I started gAutoClick. It gives you a very small window where you can specify how many clicks per what period (in milliseconds, you can see the help here http://xautoclick.sourceforge.net/documentation.html) and with what delay to start. And then the autoclick will follow your mouse. Which is pretty cool.