Python 在AWS SageMaker上导入fbprophet

Python 在AWS SageMaker上导入fbprophet,python,amazon-sagemaker,Python,Amazon Sagemaker,我正在尝试在AWS SageMaker上下载fbprophet软件包。在我的本地设备上,我可以做到这一点,但在SageMaker上无法做到。为此,我从以下位置更新了hdays.py文件的第16行: from holidays import WEEKEND, HolidayBase, easter, rd 致: 这解决了本地设备上的错误。有人知道我如何在SageMaker上下载fbprophet或如何更新下载的软件包文件夹吗 当我运行时!pip在SageMaker上安装fbprophet,弹出以

我正在尝试在AWS SageMaker上下载fbprophet软件包。在我的本地设备上,我可以做到这一点,但在SageMaker上无法做到。为此,我从以下位置更新了hdays.py文件的第16行:

from holidays import WEEKEND, HolidayBase, easter, rd
致:

这解决了本地设备上的错误。有人知道我如何在SageMaker上下载fbprophet或如何更新下载的软件包文件夹吗

当我运行
时!pip在SageMaker上安装fbprophet
,弹出以下错误:

Collecting fbprophet
  Using cached https://files.pythonhosted.org/packages/f7/86/4509e952f9724f084625e93e0bf8d8519b25c79029a0a916b0f996644c75/fbprophet-0.6.tar.gz
Requirement already satisfied: Cython>=0.22 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (0.28.4)
Requirement already satisfied: cmdstanpy==0.4 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (0.4.0)
Requirement already satisfied: pystan>=2.14 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (2.19.1.1)
Requirement already satisfied: numpy>=1.10.0 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (1.16.4)
Requirement already satisfied: pandas>=0.23.4 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (0.24.2)
Requirement already satisfied: matplotlib>=2.0.0 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (3.0.3)
Requirement already satisfied: LunarCalendar>=0.0.9 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (0.0.9)
Requirement already satisfied: convertdate>=2.1.2 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (2.2.0)
Requirement already satisfied: holidays>=0.9.5 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (0.10.1)
Requirement already satisfied: setuptools-git>=1.2 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (1.2)
Requirement already satisfied: python-dateutil>=2.8.0 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (2.8.1)
Requirement already satisfied: pytz>=2011k in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from pandas>=0.23.4->fbprophet) (2018.4)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) (2.2.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) (1.0.1)
Requirement already satisfied: cycler>=0.10 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) (0.10.0)
Requirement already satisfied: ephem>=3.7.5.3 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from LunarCalendar>=0.0.9->fbprophet) (3.7.7.0)
Requirement already satisfied: pymeeus<=1,>=0.3.6 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from convertdate>=2.1.2->fbprophet) (0.3.6)
Requirement already satisfied: six in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from holidays>=0.9.5->fbprophet) (1.11.0)
Requirement already satisfied: setuptools in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from kiwisolver>=1.0.1->matplotlib>=2.0.0->fbprophet) (41.6.0)
Building wheels for collected packages: fbprophet
  Building wheel for fbprophet (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/ec2-user/anaconda3/envs/tensorflow_p36/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-n493kv2i/fbprophet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-n493kv2i/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-vtdnatmm --python-tag cp36
       cwd: /tmp/pip-install-n493kv2i/fbprophet/
  Complete output (9 lines):
  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_888a84912910fa0a45b9d614b75bb8a8 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: Command errored out with exit status 1:
     command: /home/ec2-user/anaconda3/envs/tensorflow_p36/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-n493kv2i/fbprophet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-n493kv2i/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-om94vf2a/install-record.txt --single-version-externally-managed --compile
         cwd: /tmp/pip-install-n493kv2i/fbprophet/
    Complete output (9 lines):
    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_888a84912910fa0a45b9d614b75bb8a8 NOW.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/ec2-user/anaconda3/envs/tensorflow_p36/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-n493kv2i/fbprophet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-n493kv2i/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-om94vf2a/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
WARNING: You are using pip version 19.3.1; however, version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

使用缓存https://files.pythonhosted.org/packages/f7/86/4509e952f9724f084625e93e0bf8d8519b25c79029a0a916b0f996644c75/fbprophet-0.6.tar.gz
已满足要求:Cython>=0.22 in/home/ec2 user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages(来自fbprophet)(0.28.4)
已满足要求:cmdstanpy==0.4 in/home/ec2 user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages(来自fbprophet)(0.4.0)
已满足要求:pystan>=2.14 in/home/ec2 user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages(来自fbprophet)(2.19.1.1)
已满足要求:numpy>=1.10.0 in/home/ec2 user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages(来自fbprophet)(1.16.4)
已满足要求:熊猫>=0.23.4英寸/家庭/ec2用户/蟒蛇3/envs/tensorflow_p36/lib/python3.6/site-packages(来自fbprophet)(0.24.2)
已满足要求:matplotlib>=2.0.0 in/home/ec2 user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages(来自fbprophet)(3.0.3)
已满足要求:LunarCalendar>=0.0.9 in/home/ec2用户/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages(来自fbprophet)(0.0.9)
已满足要求:convertdate>=2.1.2 in/home/ec2 user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages(来自fbprophet)(2.2.0)
已满足要求:假期>=0.9.5 in/home/ec2用户/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages(来自fbprophet)(0.10.1)
已满足要求:setuptools git>=1.2 in/home/ec2 user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages(来自fbprophet)(1.2)
已满足要求:python dateutil>=2.8.0 in/home/ec2 user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages(来自fbprophet)(2.8.1)
已满足要求:pytz>=2011k in/home/ec2用户/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages(来自熊猫>=0.23.4->fbprophet)(2018.4)
已满足要求:pyparsing=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in/home/ec2 user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages(来自matplotlib>=2.0.0->fbprophet)(2.2.0)
已满足要求:kiwisolver>=1.0.1 in/home/ec2 user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages(来自matplotlib>=2.0.0->fbprophet)(1.0.1)
已满足要求:cycler>=0.10 in/home/ec2 user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages(来自matplotlib>=2.0.0->fbprophet)(0.10.0)
已满足要求:ephem>=3.7.5.3 in/home/ec2 user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages(来自LunarCalendar>=0.0.9->fbprophet)(3.7.7.0)
已满足要求:pymeeus=0.3.6 in/home/ec2 user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages(自convertdate>=2.1.2->fbprophet)(0.3.6)
已满足要求:六个in/home/ec2用户/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages(从节假日开始>=0.9.5->fbprophet)(1.11.0)
已满足要求:setuptools in/home/ec2 user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages(来自kiwisolver>=1.0.1->matplotlib>=2.0.0->fbprophet)(41.6.0)
为收集的包构建轮子:fbprophet
正在为fbprophet构建控制盘(setup.py)。。。错误
错误:命令出错,退出状态为1:
命令:/home/ec2 user/anaconda3/envs/tensorflow_p36/bin/python-u-c'import sys,setuptools,tokenize;sys.argv[0]=“”/tmp/pip-install-n493kv2i/fbprophet/setup.py“”__文件uu=“”/tmp/pip-install-n493kv2i/fbprophet/setup.py“”;f=getattr(标记化,“'open'”,open)(\uuuuu文件);code=f.read().replace(“\r\n”“”、“\n”“”);f、 close();exec(compile(代码,_u文件,“'exec'”)'bdist_wheel-d/tmp/pip wheel vtdnatmm--python标记cp36
cwd:/tmp/pip-install-n493kv2i/fbj/
完整输出(9行):
运转的车轮
运行构建
运行build\u py
创建构建
创建构建/库
创建build/lib/fbi
创建build/lib/fbprophet/stan_模型
信息:Pista:编译C++代码为模型ANONYMODEL,88A849 12910FA0A45 B9D614B75 BB8A8现在。
错误:命令“gcc”失败,退出状态为1
----------------------------------------
错误:无法为FBI构建控制盘
为FBI运行setup.py clean
未能生成FBI
安装收集的软件包:fbprophet
正在运行FBP的setup.py安装。。。错误
错误:命令出错,退出状态为1:
命令:/home/ec2 user/anaconda3/envs/tensorflow_p36/bin/python-u-c'import sys,setuptools,tokenize;sys.argv[0]=“”/tmp/pip-install-n493kv2i/fbprophet/setup.py“”__文件uu=“”/tmp/pip-install-n493kv2i/fbprophet/setup.py“”;f=getattr(标记化,“'open'”,open)(\uuuuu文件);code=f.read().replace(“\r\n”“”、“\n”“”);f、 close();exec(compile(代码,_u文件,“'exec'”)'安装--record/tmp/pip-record-om94vf2a/install-record.txt--外部管理的单一版本--编译
cwd:/tmp/pip-install-n493kv2i/fbj/
完整输出(9行):
正在运行的安装
运行构建
运行build\u py
创建构建
创建构建/库
创建build/lib/fbi
创建build/lib/fbprophet/stan_模型
信息:Pista:编译C++代码为模型ANONYMODEL,88A849 12910FA0A45 B9D614B75 BB8A8现在。
错误:命令“gcc”失败,退出状态为1
----------------------------------------
错误:命令错误,退出状态
Collecting fbprophet
  Using cached https://files.pythonhosted.org/packages/f7/86/4509e952f9724f084625e93e0bf8d8519b25c79029a0a916b0f996644c75/fbprophet-0.6.tar.gz
Requirement already satisfied: Cython>=0.22 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (0.28.4)
Requirement already satisfied: cmdstanpy==0.4 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (0.4.0)
Requirement already satisfied: pystan>=2.14 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (2.19.1.1)
Requirement already satisfied: numpy>=1.10.0 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (1.16.4)
Requirement already satisfied: pandas>=0.23.4 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (0.24.2)
Requirement already satisfied: matplotlib>=2.0.0 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (3.0.3)
Requirement already satisfied: LunarCalendar>=0.0.9 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (0.0.9)
Requirement already satisfied: convertdate>=2.1.2 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (2.2.0)
Requirement already satisfied: holidays>=0.9.5 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (0.10.1)
Requirement already satisfied: setuptools-git>=1.2 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (1.2)
Requirement already satisfied: python-dateutil>=2.8.0 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (2.8.1)
Requirement already satisfied: pytz>=2011k in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from pandas>=0.23.4->fbprophet) (2018.4)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) (2.2.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) (1.0.1)
Requirement already satisfied: cycler>=0.10 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) (0.10.0)
Requirement already satisfied: ephem>=3.7.5.3 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from LunarCalendar>=0.0.9->fbprophet) (3.7.7.0)
Requirement already satisfied: pymeeus<=1,>=0.3.6 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from convertdate>=2.1.2->fbprophet) (0.3.6)
Requirement already satisfied: six in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from holidays>=0.9.5->fbprophet) (1.11.0)
Requirement already satisfied: setuptools in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from kiwisolver>=1.0.1->matplotlib>=2.0.0->fbprophet) (41.6.0)
Building wheels for collected packages: fbprophet
  Building wheel for fbprophet (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/ec2-user/anaconda3/envs/tensorflow_p36/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-n493kv2i/fbprophet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-n493kv2i/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-vtdnatmm --python-tag cp36
       cwd: /tmp/pip-install-n493kv2i/fbprophet/
  Complete output (9 lines):
  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_888a84912910fa0a45b9d614b75bb8a8 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: Command errored out with exit status 1:
     command: /home/ec2-user/anaconda3/envs/tensorflow_p36/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-n493kv2i/fbprophet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-n493kv2i/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-om94vf2a/install-record.txt --single-version-externally-managed --compile
         cwd: /tmp/pip-install-n493kv2i/fbprophet/
    Complete output (9 lines):
    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_888a84912910fa0a45b9d614b75bb8a8 NOW.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/ec2-user/anaconda3/envs/tensorflow_p36/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-n493kv2i/fbprophet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-n493kv2i/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-om94vf2a/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
WARNING: You are using pip version 19.3.1; however, version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.