[PYTHON] A story I was addicted to trying to install LightFM on Amazon Linux

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

A story I was addicted to trying to install LightFM on Amazon Linux
A note I was addicted to when making a beep on Linux
A story I was addicted to trying to get a video url with tweepy
A story that I was addicted to at np.where
I was addicted to pip install mysqlclient
I was addicted to Flask on dotCloud
How to install Anisble on Amazon Linux 2
A story that I was addicted to calling Lambda from AWS Lambda.
A story I was addicted to when inserting from Python to a PostgreSQL table
I was addicted to trying Cython with PyCharm, so make a note
A story about trying to install uwsgi on an EC2 instance and failing
A story that I was addicted to when I made SFTP communication with python
How to install Linux on a 32bit UEFI PC
[AWS EC2] How to install Maven on Amazon Linux 2
I was addicted to trying logging.getLogger in Flask 1.1.x
How to build a Python environment on amazon linux 2
Install tomcat 5.5 on Amazon Linux.
Install Homebrew on Amazon Linux 2
Install strongSwan 5.9.1 on Amazon Linux 2
Install LAMP on Amazon Linux 2 and build a WordPress environment.
Install Python Pillow on Amazon Linux
Install oracle java8 on amazon linux2
When I tried to install PIL and matplotlib in a virtualenv environment, I was addicted to it.
Install Arch Linux on DeskMini A300
How to install wkhtmltopdf (Amazon Linux2)
How to install VMware-Tools on Linux
A story addicted to Azure Pipelines
Install pyenv on EC2 (Amazon Linux)
What I was addicted to when dealing with huge files in a Linux 32bit environment
Memo (March 2020) that I was addicted to when installing Arch Linux on MacBook Air 11'Early 2015
[Note] Install Imagick on Amazon Linux2
The story I was addicted to when I specified nil as a function argument in Go
I was addicted to multiprocessing + psycopg2
The record I was addicted to when putting MeCab on Heroku
A note I was addicted to when creating a table with SQLAlchemy
I was a little addicted to installing Python3.3 + mod_wsgi3.4 on Sakura VPS (CentOS), so a retrospective memo
I'll install Ruby on EC2 (Amazon Linux2) 2020
How to install aws-session-manager-plugin on Manajro Linux
I want to use Linux on mac
How to update php on Amazon linux 2
Upgraded mysql on Cloud9 (Amazon Linux) (5.5 to 5,7)
How to install packages on Alpine Linux
5 reasons to install Linux on your laptop.
How to install php7.4 on Linux (Ubuntu)
What I was addicted to Python autorun
Install Python 3.8, Pip 3.8 on EC2 (Amazon Linux 2)
A story about trying to run JavaScripthon on Windows and giving up.
I was addicted to running tensorflow on GPU with NVIDIA driver 440 + CUDA 10.2
I was addicted to creating a Python venv environment with VS Code
A story of a deep learning beginner trying to classify guitars on CNN
I was addicted to not being able to use Markdown on pypi's long_description
A memorandum because I stumbled on trying to use MeCab in Python
Build Linux on a Windows environment. Steps to install Laradock and migrate
Log when I was worried that I could not connect to Wi-Fi on Linux
What I was addicted to when creating a web application in a windows environment
[Introduction to json] No, I was addicted to it. .. .. ♬
Try to create a new command on linux
Summary of points I was addicted to running Selenium on AWS Lambda (python)
How to install Camunda Modeler on Manjaro Linux
I want to log file I / O on Linux
A note I was addicted to when running Python with Visual Studio Code