弹性豆茎,awsebcli和祝福1.9.5

时间:2015-12-15 20:52:46

标签: python amazon-web-services

几个月前,我正在使用AWS的弹性beanstalk cli而没有任何困难。我想更新我的网站并遇到此错误:

  

me $ eb status Traceback(最近一次调用最后一次):文件   " /Library/Frameworks/Python.framework/Versions/2.7/bin/eb" ;,第5行,在          来自pkg_resources import load_entry_point File" /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/ init .py",   3095行       @_call_aside文件" /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/ init .py",   第3081行,在_call_aside中       f(* args,** kwargs)File" /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/ init .py&# 34 ;,   第3108行,位于_initialize_master_working_set中       working_set = WorkingSet._build_master()File" /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/ init .py" ,   第660行,在_build_master中       return cls._build_from_requirements(需要)文件" /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/ init 的.py&#34 ;,   第673行,在_build_from_requirements中       dists = ws.resolve(reqs,Environment())File" /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/ init 的.py&#34 ;,   第846行,决议       raise DistributionNotFound(req,requirers)pkg_resources.DistributionNotFound:' blessed == 1.9.5'分配   找不到并且是awsebcli要求的

我还没有找到关于此错误的任何内容,除了question关于如何处理ubuntu上的类似问题(我在Mac上)我没有得到答复一个月。

有没有人有任何想法?

3 个答案:

答案 0 :(得分:8)

这很可能是因为eb脚本使用的是Apple的Python解释器,而不是您自己安装的脚本。

有两种解决方法:

1。在虚拟环境中运行EB CLI

  1. 通过运行virtualenv ~/eb_cli_env
  2. 为EB CLI创建虚拟环境
  3. 运行source ~/eb_cli_env/bin/activate以激活创建的虚拟环境。
  4. 运行pip install awsebcli
  5. 之后,您应该可以正常使用eb命令。每次使用EB CLI之前,您都必须运行source ~/eb_cli_env/bin/activate

    <强> - 或 -

    2。编辑eb脚本

    中的shebang行
    1. 运行vim /usr/local/bin/eb
    2. 将第一行从#!/usr/bin/python更改为#!/usr/bin/env python
    3. 这将确保eb命令在不使用虚拟环境的情况下全局工作,但是如果您升级awsebcli包,则很可能需要再次编辑shebang行。

答案 1 :(得分:4)

我的建议是在osx上通过brew安装。

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install.html#eb-cli3-install-osx

在我的情况下,我通过pip删除了以前的安装:

pip uninstall awsebcli

并运行

brew install awsebcli

答案 2 :(得分:0)

.controller('newsController', ['$scope', 'gasPrices',
                                  function($scope, gasPrices) { 
  //Create a object that will be pass in the directive, then when this variable
  //it's loaded, the value in the directive (if the scope of the directive uses the '=' binding) will be updated
  $scope.gasFeed = {}; 

  gasPrices.success(function(data) {
    $scope.gasFeed = data.series[0];    
  });

  $scope.myData02 = [2.095,2.079,2.036,1.988,1.882,1.817,1.767,1.747];

}]);

我能找到的一切