The title is as it is, but as a memorandum.
The conclusion is that "Amazon Linux gcc does not include the OpenMP runtime environment, so a manual reinstallation is required."
Please check this area for LightFM
--Create a model that recommends movies with supervised machine learning [Light FM] https://sja-analysis.org/python-lightfm/ --I tried applying LightFM to Movielens https://qiita.com/guglilac/items/757fc665510c9b68f385
Well, for the time being, installing LightFM
pip install lightfm
It's OK, but if you do this normally on Amazon Linux
There is no such file or directory
I get the error.
So, referring to the article [here](https://qiita.com/takebozu/items/c521f3937190fe8d3102), it is as follows.
> It seems that gcc7.2 installed by yum does not include the OpenMP header file omp.h used by Qulacs.
So what to do
>```
>sudo yum erase gcc72 gcc72-c++ libgcc72
>```
> Delete gcc7.2 once. Then install gcc 7.4.0 again by hand.
Oh, is that so?
That's why I have to build / install gcc from source, but that's a good article. It was very helpful.
--Build / install gcc from source
https://qiita.com/liveralmask/items/6ed4a98ebb3bf6b7f707
It's almost the same as what is written here, but as for the version, 10.2.0 is the latest as of September 23, 2020, so I changed that. The execution command is as follows.
wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-10.2.0/gcc-10.2.0.tar.gz tar zxvf gcc-10.2.0.tar.gz cd gcc-10.2.0 ./contrib/download_prerequisites mkdir build cd build ../configure --enable-languages=c,c++ --prefix=/usr/local --disable-bootstrap --disable-multilib make > /dev/null sudo make install all
It will take some time to execute make, so please wait patiently.
So, after the above implementation, again
pip install lightfm
You can install it smoothly by executing.
Recommended Posts