Sanic: install err

Created on 3 Aug 2017  路  2Comments  路  Source: sanic-org/sanic

run $ /root/venv/bin/python3 -m pip install sanic

and err message

Collecting sanic
  Using cached sanic-0.6.0-py3-none-any.whl
Collecting ujson>=1.35 (from sanic)
  Using cached ujson-1.35.tar.gz
Requirement already satisfied: websockets>=3.2 in ./venv/lib/python3.6/site-packages (from sanic)
Collecting httptools>=0.0.9 (from sanic)
  Using cached httptools-0.0.9.tar.gz
Requirement already satisfied: uvloop>=0.5.3 in ./venv/lib/python3.6/site-packages (from sanic)
Requirement already satisfied: aiofiles>=0.3.0 in ./venv/lib/python3.6/site-packages (from sanic)
Installing collected packages: ujson, httptools, sanic
  Running setup.py install for ujson ... error
    Complete output from command /root/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ibpd_ke1/ujson/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-50hxxhqb-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/venv/include/site/python3.6/ujson:
    running install
    running build
    running build_ext
    building 'ujson' extension
    creating build
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/python
    creating build/temp.linux-x86_64-3.6/lib
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./python -I./lib -I/root/venv/include -I/usr/local/include/python3.6m -c ./python/ujson.c -o build/temp.linux-x86_64-3.6/./python/ujson.o -D_GNU_SOURCE
    unable to execute 'gcc': No such file or directory
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/root/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ibpd_ke1/ujson/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-50hxxhqb-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/venv/include/site/python3.6/ujson" failed with error code 1 in /tmp/pip-build-ibpd_ke1/ujson/
question

Most helpful comment

looks like you didn't install gcc which is required for building ujson,

try install gcc on your system, with commands:

on Debian/Ubuntu

sudo apt-get install build-essential

on CentOS

sudo yum install gcc

All 2 comments

looks like you didn't install gcc which is required for building ujson,

try install gcc on your system, with commands:

on Debian/Ubuntu

sudo apt-get install build-essential

on CentOS

sudo yum install gcc

good

Was this page helpful?
0 / 5 - 0 ratings