2017-12-18 3 views
0

오류가 발생했습니다. uwsgi 용 휠 제작에 실패했습니다. 내 환경은 지금은 uwsgi를 설치 싶어, 내가 명령 pip install uwsgi 나누었다 오류가uwsgi 용 휠 제작에 실패했습니다

Traceback (most recent call last): 
 
    File "<string>", line 1, in <module> 
 
    File "/tmp/pip-build-9t06jm4_/uwsgi/setup.py", line 126, in <module> 
 
     distclass=uWSGIDistribution, 
 
    File "/home/ubuntu/anaconda3/lib/python3.5/distutils/core.py", line 148, in setup 
 
     dist.run_commands() 
 
    File "/home/ubuntu/anaconda3/lib/python3.5/distutils/dist.py", line 955, in run_commands 
 
     self.run_command(cmd) 
 
    File "/home/ubuntu/anaconda3/lib/python3.5/distutils/dist.py", line 974, in run_command 
 
     cmd_obj.run() 
 
    File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 215, in run 
 
     self.run_command('install') 
 
    File "/home/ubuntu/anaconda3/lib/python3.5/distutils/cmd.py", line 313, in run_command 
 
     self.distribution.run_command(command) 
 
    File "/home/ubuntu/anaconda3/lib/python3.5/distutils/dist.py", line 974, in run_command 
 
     cmd_obj.run() 
 
    File "/tmp/pip-build-9t06jm4_/uwsgi/setup.py", line 77, in run 
 
     conf = uc.uConf(get_profile()) 
 
    File "/tmp/pip-build-9t06jm4_/uwsgi/uwsgiconfig.py", line 742, in __init__ 
 
     raise Exception("you need a C compiler to build uWSGI") 
 
    Exception: you need a C compiler to build uWSGI 
 

 
    ---------------------------------------- 
 
    Failed building wheel for uwsgi 
 
    Running setup.py clean for uwsgi 
 
Failed to build uwsgi 
 
Installing collected packages: uwsgi 
 
    Running setup.py install for uwsgi ... error 
 
    Complete output from command /home/ubuntu/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-9t06jm4_/uwsgi/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-oxbyg6gk-record/install-record.txt --single-version-externally-managed --compile: 
 
    /home/ubuntu/anaconda3/lib/python3.5/distutils/dist.py:261: UserWarning: Unknown distribution option: 'descriptions' 
 
     warnings.warn(msg) 
 
    running install 
 
    using profile: buildconf/default.ini 
 
    detected include path: ['/usr/include', '/usr/local/include'] 
 
    Traceback (most recent call last): 
 
     File "/tmp/pip-build-9t06jm4_/uwsgi/uwsgiconfig.py", line 734, in __init__ 
 
     gcc_version_components = gcc_version.split('.') 
 
    AttributeError: 'NoneType' object has no attribute 'split' 
 

 
    During handling of the above exception, another exception occurred: 
 

 
    Traceback (most recent call last): 
 
     File "<string>", line 1, in <module> 
 
     File "/tmp/pip-build-9t06jm4_/uwsgi/setup.py", line 126, in <module> 
 
     distclass=uWSGIDistribution, 
 
     File "/home/ubuntu/anaconda3/lib/python3.5/distutils/core.py", line 148, in setup 
 
     dist.run_commands() 
 
     File "/home/ubuntu/anaconda3/lib/python3.5/distutils/dist.py", line 955, in run_commands 
 
     self.run_command(cmd) 
 
     File "/home/ubuntu/anaconda3/lib/python3.5/distutils/dist.py", line 974, in run_command 
 
     cmd_obj.run() 
 
     File "/tmp/pip-build-9t06jm4_/uwsgi/setup.py", line 77, in run 
 
     conf = uc.uConf(get_profile()) 
 
     File "/tmp/pip-build-9t06jm4_/uwsgi/uwsgiconfig.py", line 742, in __init__ 
 
     raise Exception("you need a C compiler to build uWSGI") 
 
    Exception: you need a C compiler to build uWSGI 
 

 
    ---------------------------------------- 
 
Command "/home/ubuntu/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-9t06jm4_/uwsgi/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-oxbyg6gk-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-9t06jm4_/uwsgi/

내가 명령 sudo는 apt-get을, -y 파이썬 - dev에 설치하지만, 같은 실행 일 실행 우분투입니다 오류가 발생합니다. 왜 이러한 오류가 발생하는지 실제로 이해할 수 없습니다. 어떻게 수정해야합니까? 왜 내가 uSSGI에서 C 컴파일러가 필요하다고 말했습니까? 어떻게 수정해야합니까?

답변

1

귀하의 예외를 명시 적으로 무엇이 잘못되었는지 말한다 :

gcc_version_components = gcc_version.split('.') 
AttributeError: 'NoneType' object has no attribute 'split' 

및 일반 그래서

raise Exception("you need a C compiler to build uWSGI") 
Exception: you need a C compiler to build uWSGI 

시스템이 C 컴파일러가 설치되어 있지 않은 (예를 들어 GCC). 설치를 시도하십시오. 우분투에서는 sudo apt-get install gcc이 될 것입니다.

BTW. 나는이 질문이 askubuntu 페이지에 더 잘 맞을 것이라고 생각한다.

관련 문제