вторник, 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)



Няма коментари:

Публикуване на коментар