1

I try to install superset on Centos 7, i've followed the official site Apache Superset and i've installed all required dependencies:

sudo yum upgrade python-setuptools
Plugin abilitati:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.inode.at
 * centosplus: mirror.inode.at
 * epel: mirror.inode.at
 * extras: mirror.nextlayer.at

No packages marked for update
The gcc-4.8.5-39.el7.x86_64 package is already installed and updated to the latest version
The gcc-c ++ - 4.8.5-39.el7.x86_64 package is already installed and updated to the latest version
The libffi-devel-3.0.13-18.el7.x86_64 package is already installed and updated to the latest version
The python-devel-2.7.5-86.el7.x86_64 package is already installed and updated to the latest version
The python2-pip-8.1.2-12.el7.noarch package is already installed and updated to the latest version
The python2-wheel-0.29.0-2.el7.noarch package is already installed and updated to the latest version
Package 1: openssl-devel-1.0.2k-19.el7.x86_64 is already installed and updated to the latest version
The cyrus-sasl-devel-2.1.26-23.el7.x86_64 package is already installed and updated to the latest version
The openldap-devel-2.4.44-21.el7_6.x86_64 package is already installed and updated to the latest version

But i've this error when execute

pip install apache-superset

for python-geohash

   ERROR: Command errored out with exit status 1:
     command: /home/mik/supersetvenv/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6xsufws2/python-geohash/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6xsufws2/python-geohash/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-rvrvxjco/install-record.txt --single-version-externally-managed --compile --install-headers /home/mik/supersetvenv/include/site/python3.6/python-geohash
         cwd: /tmp/pip-install-6xsufws2/python-geohash/
    Complete output (16 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    copying geohash.py -> build/lib.linux-x86_64-3.6
    copying quadtree.py -> build/lib.linux-x86_64-3.6
    copying jpgrid.py -> build/lib.linux-x86_64-3.6
    copying jpiarea.py -> build/lib.linux-x86_64-3.6
    running build_ext
    building '_geohash' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/src
    gcc -pthread -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -stdlib=libc++ -fPIC -DPYTHON_MODULE=1 -I/home/mik/supersetvenv/include -I/usr/include/python3.6m -c src/geohash.cpp -o build/temp.linux-x86_64-3.6/src/geohash.o
    gcc: error: unrecognized command line option ‘-stdlib=libc++’
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/mik/supersetvenv/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6xsufws2/python-geohash/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6xsufws2/python-geohash/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-rvrvxjco/install-record.txt --single-version-externally-managed --compile --install-headers /home/mik/supersetvenv/include/site/python3.6/python-geohash Check the logs for full command output.

Someone can help me?

Mik
  • 13
  • 1
  • 3
  • looks like you'd need to configure with clang, see https://stackoverflow.com/questions/34654682/unrecognized-command-line-option-stdlib-libc-gcc-homebrew-gcc-5-3-0-5-3-0 – Jean-François Fabre Mar 10 '20 at 18:00

3 Answers3

0

Try these steps..

    sudo yum -y upgrade python-setuptools
    pip install --upgrade setuptools pip
    pip install --upgrade pip
    pip3 install --upgrade pip
    # hash -r
    pip install virtualenv

    python3 -m venv venv
    . venv/bin/activate

    pip install --upgrade setuptools pip

    pause 'Pause - press Enter to continue'

    # Install superset
    pip install superset
    pip uninstall --yes pandas
    pip install pandas==0.23.4
    pip install sqlalchemy==1.2.18
    pip install flask==1.0.0

    # Initialize the database
    superset db upgrade
Ganesh Chandrasekaran
  • 1,490
  • 10
  • 16
0

I find the solution: I remove packages gcc gcc-c++ libffi-devel python-devel and I reinstall them

sudo yum erase gcc gcc-c++ libffi-devel python-devel

sudo yum install gcc gcc-c++ libffi-devel python-devel

Because in /usr/include/python3.6m I didn't have file *.h to include in the compilation.

Mik
  • 13
  • 1
  • 3
0

Same issue, and Mik's answer is the solution.

But in addition to his answer: Now the python-devel is called python36-devel. Use this to check the correct name if someone had the problem about "can't find python-devel".

# check the name of python.devel
> sudo yum search python3 | grep devel

# install the python36.devel
> sudo yum install python36.devel
colidyre
  • 3,401
  • 11
  • 33
  • 47
Tieruious
  • 16
  • 1
  • I tried to edit your answer that it does not look only like a comment to Mik's answer. I'm still not sure if I reached that. Maybe you want to add some more values here? – colidyre Apr 14 '20 at 22:51
  • 1
    if this doesn't work find the python devel & install in my case `yum install -y python3-devel.x86_64` – Aqua 4 Jan 05 '22 at 14:04