首页 文章

错误:命令'gcc'在安装python手套时失败,退出状态为1

提问于
浏览
0

我正在使用命令“pip install glove_python” . 但它给了我以下错误:

`运行setup.py install for glove-python ... error从命令/ 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-external-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 / gloves / glove_cython.o -fopenmp -ffast-math clang:error:unsupported option '-fopenmp' error :comman d 'gcc'失败,退出状态为1

----------------------------------------

命令"/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"失败,错误代码1在/ private / var / folders / xf / hy2wkn4s3nd98k159rpws03nnt3rbk / T / pip-install-eio_81ve / glove-python /`

1 回答

  • 1

    实际上你有这个错误 "command 'gcc' failed with exit status 1" 根据你的操作系统,你有一些步骤来解决它 . 首先,确保您已经激活了虚拟环境 . 访问this site以安装和激活 virtualenv . 你的Python版本是 3.6 你需要安装 Python Development Package .

    deb基础: sudo apt-get install python3.6-dev link:

    基于rpm: sudo yum install python36u-devel link:

    如果你以前更好地安装它't have ' gcc ' package you'

相关问题