[英]error: command 'gcc' failed with exit status 1 while installing python glove
I am using the command "pip install glove_python". 我正在使用命令“ pip install Gloves_python”。 But it is giving me the below error:
但这给了我以下错误:
`Running setup.py install for glove-python ... error Complete output from command /Users/mmt6384/anaconda3/bin/python -u -c "import setuptools, tokenize; file ='/private/var/folders/xf/hy2wkn4s3nd98k159rpws03nnt3rbk/T/pip-install-eio_81ve/glove-python/setup.py';f=getattr(tokenize, 'open', open)( file );code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, file , 'exec'))" install --record /private/var/folders/xf/hy2wkn4s3nd98k159rpws03nnt3rbk/T/pip-record-9ljtw6cb/install-record.txt --single-version-externally-managed --compile: running install running build running build_py running build_ext building 'glove.glove_cython' extension gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/mmt6384/anaconda3/include -arch x86_64 -I/Users/mmt6384/anaconda3/include -arch x86_64 -I/Users/mmt6384/anaconda3/include/python3.6m -c glove/glove_cython.c -o build/temp.macosx-10.7-x86_64-3.6/glove/glove_cython.o -fopenmp -ffast-ma `正在运行手套-python的setup.py安装...错误从命令/ Users / mmt6384 / anaconda3 / bin / python -u -c“ import setuptools,tokenize; file ='/ private / var / folders / xf / hy2wkn4s3nd98k159rpws03nnt3rbk / T / pip-install-eio_81ve / glove-python / setup.py'; f = getattr(tokenize,'open',open)( file ); code = f.read()。replace('\\ r \\ n ','\\ n'); f.close(); exec(compile(code, file ,'exec')))“安装--record / private / var / folders / xf / hy2wkn4s3nd98k159rpws03nnt3rbk / T / pip-record-9ljtw6cb /install-record.txt-单一版本-外部管理-编译:运行安装正在运行的构建正在运行build_py的运行build_ext建筑物'glove.glove_cython'扩展gcc -Wno-unused-result -Wsign-compare -Wunreachable-code- DNDEBUG -g -fwrapv -O3 -Wall -Wstrict原型-I / Users / mmt6384 / anaconda3 / include -arch x86_64 -I / Users / mmt6384 / anaconda3 / include -arch x86_64 -I / Users / mmt6384 / anaconda3 / include / python3.6m -c手套/glove_cython.c -o build / temp.macosx-10.7-x86_64-3.6 / glove / glove_cython.o -fopenmp -ffast-ma th clang: error: unsupported option '-fopenmp' error: command 'gcc' failed with exit status 1
第clang:错误:不支持的选项'-fopenmp'错误:命令'gcc'失败,退出状态为1
----------------------------------------
Command "/Users/mmt6384/anaconda3/bin/python -u -c "import setuptools, tokenize; 命令“ / Users / mmt6384 / anaconda3 / bin / python -u -c”导入setuptools,标记化; file ='/private/var/folders/xf/hy2wkn4s3nd98k159rpws03nnt3rbk/T/pip-install-eio_81ve/glove-python/setup.py';f=getattr(tokenize, 'open', open)( file );code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, file , 'exec'))" install --record /private/var/folders/xf/hy2wkn4s3nd98k159rpws03nnt3rbk/T/pip-record-9ljtw6cb/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/xf/hy2wkn4s3nd98k159rpws03nnt3rbk/T/pip-install-eio_81ve/glove-python/`
文件 ='/ private / var / folders / xf / hy2wkn4s3nd98k159rpws03nnt3rbk / T / pip-install-eio_81ve / glove-python / setup.py'; f = getattr(tokenize,'open',open)( file ); code = f .read()。replace('\\ r \\ n','\\ n'); f.close(); exec(compile(code, file ,'exec'))“ install --record / private / var / folders /xf/hy2wkn4s3nd98k159rpws03nnt3rbk/T/pip-record-9ljtw6cb/install-record.txt --single-version-externally-managed --compile“失败,错误代码为/ private / var / folders / xf / hy2wkn4s3nd98k159rpws03Tnt PIP-安装-eio_81ve /手套蟒蛇/`
You got this error actually "command 'gcc' failed with exit status 1" Based on your os, you have some steps to fix it. 您实际上收到了此错误“命令'gcc'失败,退出状态为1”根据您的操作系统,您有一些步骤可以解决此问题。 First of all, make sure you already activate your virtual environment.
首先,请确保您已经激活了虚拟环境。 Visit this site for installing and activating virtualenv .
访问此站点以安装和激活virtualenv 。 your Python version is 3.6 you need to install Python Development Package .
如果您的Python版本是3.6 ,则需要安装Python开发包 。
deb based : sudo apt-get install python3.6-dev
link: 基于deb:
sudo apt-get install python3.6-dev
链接:
rpm based : sudo yum install python36u-devel
link: 基于rpm:
sudo yum install python36u-devel
链接:
if you don't have ' gcc ' package you'd better install it before. 如果您没有' gcc '软件包,则最好先安装它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.