0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

AWS EC2で「pip install annoy」でgccのエラー解決策

Posted at

Annoyをインストールしようとしたら...

pip install annoy
地獄の長いエラー...
...
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

##解決策
問題は、g++がないことでした。
情報源:Error trying to exec 'cc1plus': execvp: No such file or directory

無料枠のLinuxサーバー(CentOS)を使っているので、このようにインストール。

sudo yum -y install gcc-c++

情報源:g++をCentOSへインストールする

うまく行きました。✌️

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
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?