Gcc error solution with "pip install annoy" on AWS EC2

When I try to install Annoy ...

pip install annoy
Long error in hell...
...
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/ec2-user/.pyenv/versions/3.7.0/include/python3.7m -c src/annoymodule.cc -o build/temp.linux-x86_64-3.7/src/annoymodule.o -D_CRT_SECURE_NO_WARNINGS -march=native -O3 -ffast-math -fno-associative-math -DANNOYLIB_MULTITHREADED_BUILD -std=c++14
    gcc: error trying to exec 'cc1plus': execvp: No such file or directory
    error: command 'gcc' failed with exit status 1

solution

__ The problem was the lack of g ++. __ Source: Error trying to exec'cc1plus': execvp: No such file or directory

I'm using a free Linux server (CentOS), so install it like this.

sudo yum -y install gcc-c++

Source: Install g ++ on CentOS

It went well. ✌️

Collecting annoy
  Using cached annoy-1.17.0.tar.gz (646 kB)
Using legacy 'setup.py install' for annoy, since package 'wheel' is not installed.
Installing collected packages: annoy
    Running setup.py install for annoy ... done
Successfully installed annoy-1.17.0

Recommended Posts

Gcc error solution with "pip install annoy" on AWS EC2
Install docker on AWS EC2
Install docker-compose on a Graviton 2 instance of AWS EC2
How to install Ruby on an EC2 instance on AWS
I struggled with pip install on an M1 Mac
Install Ruby on MSYS2 with pacman
Install Docker on AWS Ubunt 20.04 LTS
Error when npm install on Windows 7
Install AWS IoT Greengrass on Ubuntu
Error when deploying EC2 on CircleCI
DB error on deploying with Heroku
Install ruby on Ubuntu 20.04 with rbenv
Build a development environment on AWS EC2 with CentOS7 + Nginx + pm2 + Nuxt.js
EFS mount on AWS Ubuntu EC2 (amazon-efs-utils)
Easy deployment with Capistrano + AWS (EC2) + Rails
Using Java with AWS Lambda-Implementation-Stop / Launch EC2
Install Java8 with Yum on Amazon Linux
Build an environment with Docker on AWS