前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >专栏 >centos prophet error: command 'gcc' failed with exit status 1

centos prophet error: command 'gcc' failed with exit status 1

作者头像
lovelife110
发布于 2021-01-14 06:38:06
发布于 2021-01-14 06:38:06
2.5K00
代码可运行
举报
文章被收录于专栏:爱生活爱编程爱生活爱编程
运行总次数:0
代码可运行
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Collecting fbprophet
  Using cached https://files.pythonhosted.org/packages/33/fb/ad98d46773929079657706e6b2b6e366ba6c282bc2397d8f9b0ea8e5614c/fbprophet-0.5.tar.gz
Requirement already satisfied: Cython>=0.22 in /usr/local/lib/python3.6/site-packages (from fbprophet) (0.29.2)
Requirement already satisfied: pystan>=2.14 in /usr/local/lib/python3.6/site-packages (from fbprophet) (2.19.0.0)
Requirement already satisfied: numpy>=1.10.0 in /usr/local/lib/python3.6/site-packages (from fbprophet) (1.15.4)
Requirement already satisfied: pandas>=0.23.4 in /usr/local/lib/python3.6/site-packages (from fbprophet) (0.24.2)
Requirement already satisfied: matplotlib>=2.0.0 in /usr/local/lib/python3.6/site-packages (from fbprophet) (2.1.1)
Requirement already satisfied: lunardate>=0.1.5 in /usr/local/lib/python3.6/site-packages (from fbprophet) (0.2.0)
Requirement already satisfied: convertdate>=2.1.2 in /usr/local/lib/python3.6/site-packages (from fbprophet) (2.1.3)
Requirement already satisfied: holidays>=0.9.5 in /usr/local/lib/python3.6/site-packages (from fbprophet) (0.9.10)
Requirement already satisfied: setuptools-git>=1.2 in /usr/local/lib/python3.6/site-packages (from fbprophet) (1.2)
Requirement already satisfied: pytz>=2011k in /usr/local/lib/python3.6/site-packages (from pandas>=0.23.4->fbprophet) (2017.3)
Requirement already satisfied: python-dateutil>=2.5.0 in /usr/local/lib/python3.6/site-packages (from pandas>=0.23.4->fbprophet) (2.6.1)
Requirement already satisfied: six>=1.10 in /usr/local/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) (1.11.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) (2.2.0)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) (0.10.0)
Requirement already satisfied: ephem<3.8,>=3.7.5.3 in /usr/local/lib/python3.6/site-packages (from convertdate>=2.1.2->fbprophet) (3.7.6.0)
Building wheels for collected packages: fbprophet
  Building wheel for fbprophet (setup.py) ... error
  ERROR: Complete output from command /usr/local/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-1d7ho9yv/fbprophet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-c4yb__rd --python-tag cp36:
  ERROR: running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib
  creating build/lib/fbprophet
  creating build/lib/fbprophet/stan_model
  INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_861b75c6337e237650a61ae58c4385ef NOW.
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for fbprophet
  Running setup.py clean for fbprophet
Failed to build fbprophet
Installing collected packages: fbprophet
  Running setup.py install for fbprophet ... error
    ERROR: Complete output from command /usr/local/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-1d7ho9yv/fbprophet/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-record-n386ioss/install-record.txt --single-version-externally-managed --compile:
    ERROR: running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/fbprophet
    creating build/lib/fbprophet/stan_model
    INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_861b75c6337e237650a61ae58c4385ef NOW.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command "/usr/local/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-1d7ho9yv/fbprophet/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-record-n386ioss/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-1d7ho9yv/fbprophet/

centos环境下

error: command 'gcc' failed with exit status 1

这个问题是因为fbprophet安装是依赖pystan ,而pystan 需要C++编译器

fbprophet建议使用Anaconda安装,不容易出问题

当前error: command 'gcc' failed with exit status 1 问题一般有几种:

1、pystan 版本,使用2.17.1.0 版本,本人测过没问题

sudo pip uninstall pystan sudo pip install pystan==2.17.1.0 sudo pip install fbprophet

2、安装gcc相关

yum install gcc gcc-c++

yum groupinstall "Development Tools" 相当于 build-essential

3、python dev相关

yum install python-devel

添加源:yum install -y https://centos7.iuscommunity.org/ius-release.rpm

通过搜索找到对应的dev包:yum search python36u-deve

4、虚拟机内存

如果使用的是虚拟机,请注意安装FBProphet至少需要4GB内存,使用FBProphet至少需要2GB内存。

测试pystan 方法

创建py文件test.py:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
import pystan
model_code = 'parameters {real y;} model {y ~ normal(0,1);}'
model = pystan.StanModel(model_code=model_code)  # this will take a minute
y = model.sampling(n_jobs=1).extract()['y']
y.mean()  # should be close to 0

执行python test.py

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2019/05/17 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
暂无评论
推荐阅读
编辑精选文章
换一批
【python】prepare for
/tmp/tmp4BEPxg/pip.zip/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
py3study
2020/01/03
6640
【已解决】error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools
报错信息里给了下载连接, error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
HammerZe
2022/05/09
10.4K0
【已解决】error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools
centos7 yum 安装 tesseract pip 安装 python3 tesserocr
(adsbygoogle = window.adsbygoogle || []).push({});
拓荒者
2019/03/11
1.3K0
Locust package has moved from 'locustio' to 'locust'. Please update your reference (or pin your vers
错误日志: C:\Users\xieboke>pip install locustio -U Collecting locustio Using cached locustio-0.999.tar.gz (267 kB) Building wheels for collected packages: locustio Building wheel for locustio (setup.py) ... error ERROR: Command errored out with exit stat
卓越笔记
2023/02/18
3590
【错误记录】Mac 中 Python 报错 ( ERROR: Could not build wheels for numpy which use PEP 517 | 问题未解决 | 问题记录 )
文章目录 一、报错信息 二、解决方案 一、报错信息 ---- 首先 , 更新 pip ; 执行如下命令 : /usr/local/bin/python3 -m pip install --upgrade pip 执行结果 : octopus-2:~ octopus$ /usr/local/bin/python3 -m pip install --upgrade pip Requirement already satisfied: pip in /Library/Frameworks/Python.fram
韩曙亮
2023/03/29
1.4K0
【错误记录】Mac 中 Python 报错 ( ERROR: Could not build wheels for numpy which use PEP 517 | 问题未解决 | 问题记录 )
【Python报错】有效解决pip3安装matplotlib!
问题 使用 pip3 install matplotlib 报错: Running setup.py bdist_wheel for pillow ... error Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-prbp5o66/pillow/setup.py';f=getattr(tokenize, 'open', open)(__
Lokinli
2023/03/09
9790
macOS使用django安装mysqlclient遇到的问题(mysqlclient 1.3.3 or newer is required)
最近需要使用django搭建一个网站,使用的数据库是mysql。 mac电脑里面已经安装好了mysql-5.7-community。 之前使用的python和mysql的链接模块是Pymysql,使用django-11.3版本的时候没有需要问题。但是重新更新了django到2.0,下载好之前的配置后(requests),运行程序发现这个问题:
老潘
2018/06/21
1.7K0
macOS使用django安装mysqlclient遇到的问题(mysqlclient 1.3.3 or newer is required)
如何使用rdbtools分析redis大key
熟悉redis的朋友都知道,大key是在应用的设计和实践当中应该尽量避免的风险。大key的危险有很多,例如:
于航
2021/03/18
3.4K0
如何使用Python Impyla客户端连接Hive和Impala
继上一章讲述如何在CDH集群安装Anaconda&搭建Python私有源后,本章节主要讲述如何使用Pyton Impyla客户端连接CDH集群的HiveServer2和Impala Daemon,并进行SQL操作。
Fayson
2018/03/29
10.8K0
如何使用Python Impyla客户端连接Hive和Impala
python安装、数据类型和变量
2018.06.06 1.1为什么要学习python 学习方法: 边看边做不能只看不做 笔记要记录详细
py3study
2020/01/06
5980
python安装、数据类型和变量
【说站】python分布式执行框架Ray的介绍
python分布式执行框架Ray的介绍 说明 1、Ray为构建分布式应用程序提供了一个简单、通用的API。 2、Ray是一种分布式执行框架,便于大规模应用程序和利用先进的机器学习库。 Ray通过以下方式完成这项任务: 为构建和运行分布式应用程序提供简单的原语。 使最终用户能够并行化单个机器代码,而代码更改很少到零。 在核心Ray之上包含大量应用程序、库和工具,以支持复杂的应用程序。 安装方法 [root@node2 ~]# pip install 'ray[default]' Looking in in
很酷的站长
2022/11/24
1.4K0
【说站】python分布式执行框架Ray的介绍
MacOS mysqlclient ERROR: Command errored out with exit status 1: python setup.py egg_info Check the
安装环境 Mac OS django 2.2 错误日志 pip install mysqlclient (qingjiu) yinzhuoqundeMacBook-Pro:QingJiuSystem yinzhuoqun$ pip install mysqlclient Collecting mysqlclient Using cached mysqlclient-1.4.6.tar.gz (85 kB) ERROR: Command errored out with exit status
卓越笔记
2023/02/18
5250
解决MacOS pip安装mysqlclient错误
错误详情: Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting mysqlclient Downloading https://pypi.tuna.tsinghua.edu.cn/packages/4d/38/c5f8bac9c50f3042c8f05615f84206f77f03db79781db841898fde1bb284/mysqlclient-1.4.4.tar.gz (86kB) |███
小贝壳
2020/03/05
2.8K0
解决cannot find -lm
这个问题我因为不是第一次遇到了,但是每次都去网站找答案,结果找了一圈,发现大多都并不能解决问题,这次终于花了点时间解决了这个问题,故此记录下来
py3study
2020/01/06
2.7K0
anaconda3 安装tensorfl
今天要在ananconda3 下安装Keras & TensorFlow 结果第一个很顺利,但是第二个的时候就报错了
py3study
2020/01/09
8470
CentOS大数据实验环境更改记录
下载对应版本repo文件, 放入/etc/yum.repos.d/(操作前请做好相应备份)
py3study
2020/01/03
5650
Airflow安装教程
该文章介绍了如何利用Python的Pandas库和Matplotlib库绘制数据可视化图形。首先介绍了数据可视化的重要性,然后详细讲解了如何利用Pandas和Matplotlib进行数据可视化。最后,提供了一些示例代码和详细的注释说明,方便读者理解和学习。
程裕强
2018/01/02
3.9K0
Airflow安装教程
drf 启动报错:AssertionError: `coreapi` must be installed for schema support.
AssertionError: `coreapi` must be installed for schema support.
卓越笔记
2023/02/18
8310
pip 相关
使用国内镜像 https://pypi.tuna.tsinghua.edu.cn/simple 例如我要安装 scrapy
AnRFDev
2021/02/01
9500
>>Python:Anaconda3
安装好之后,可以使用命令conda,可以使用一系列命令参数,conda --help 或 conda -h 、 conda --version 或 conda -V
艾特
2023/10/10
3500
推荐阅读
相关推荐
【python】prepare for
更多 >
LV.1
某上市公司架构师
作者相关精选
领券
社区富文本编辑器全新改版!诚邀体验~
全新交互,全新视觉,新增快捷键、悬浮工具栏、高亮块等功能并同时优化现有功能,全面提升创作效率和体验
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
查看详情【社区公告】 技术创作特训营有奖征文