【问题标题】:error: command 'gcc' failed with exit status 1 while installing python glove错误:安装 python 手套时命令“gcc”失败,退出状态为 1
【发布时间】:2018-09-30 17:58:27
【问题描述】:

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

`运行 setup.py install for glove-python ... 错误 命令 /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: 运行安装 运行构建 运行 build_py 运行 build_ext 构建“glove.glove_cython”扩展 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-数学 铿锵声:错误:不支持的选项'-fopenmp' 错误:命令“gcc”失败,退出状态为 1

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

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

【问题讨论】:

  • 你在 OSX 上吗?如果是这样,请尝试从 homebrew 安装最新版本的 gcc

标签: python-3.x


【解决方案1】:

您实际上遇到了这个错误“command 'gcc' failed with exit status 1” 根据您的操作系统,您有一些步骤可以修复它。首先,确保您已经激活了虚拟环境。访问 this site 以安装和激活 virtualenv。 您的 Python 版本是 3.6,您需要安装 Python 开发包

基于 deb:sudo apt-get install python3.6-devlink:

基于转速:sudo yum install python36u-devellink:

如果您没有 'gcc' 软件包,最好先安装它。

【讨论】:

    猜你喜欢
    • 2016-11-01
    • 2012-06-21
    • 2019-12-01
    • 2023-03-19
    • 1970-01-01
    • 1970-01-01
    • 2014-07-06
    • 2011-11-11
    • 1970-01-01
    相关资源
    最近更新 更多