'easy_install'未被识别为内部或外部命令,可操作程序或批处理文件

时间:2012-04-18 18:40:35

标签: python windows-7 python-2.7 easy-install

我刚刚在Windows 7计算机上下载并安装了最新版本的Python。

Python 2.7.3

现在我想安装一个我在网上找到的Twitter library

但是,当我尝试运行easy_install tweepy时,收到以下错误消息:

  

' easy_install的'不被认为是内部或外部的   命令,可操作程序或批处理文件。

Python已经放入我的路径,因为我可以在命令行中调用Python程序。


以下是我安装Python的文件夹的截图。

enter image description here

在Tools文件夹中:

enter image description here

在scripts文件夹中:

enter image description here

6 个答案:

答案 0 :(得分:10)

你需要:

  1. 安装easy_install:http://pypi.python.org/pypi/setuptools

  2. C:\Python27\Scripts添加到您的PATH

答案 1 :(得分:6)

我在Python 3.4中遇到了同样的问题。使用以下步骤修复它:

  

cd C:\ Python34 \ Scripts   。\ easy_install pip

(或您需要安装的内容) 使用。\你可以为命令授予管理员权限

答案 2 :(得分:3)

我认为您应该set the 'PATH'变量才能执行它

答案 3 :(得分:1)

您的系统上似乎没有安装easy-install。

有关安装的说明,请参阅此previous question

答案 4 :(得分:0)

  
    

需要安装基本的官方python软件包

  

您可以通过输入以下内容来通过命令行安装软件包:

class purchase_order(osv.osv):
_name = 'purchase.order'
_inherit = 'purchase.order'

def _prepare_order_line_move(self, cr, uid, order, order_line, picking_id, context=None):
    if context is None:
        context={}        
    res=super(purchase_order,self)._prepare_order_line_move(cr, uid, order, order_line, picking_id, context)
    res['qty_uos2'] = order_line.product_qty
    res['uos_id2'] = order_line.product_uom.id
    res['product_qty'] = order_line.qty_uos2
    res['product_uos_qty'] = order_line.qty_uos2
    res['product_uom'] = order_line.uos_id2.id
    res['product_uos'] = order_line.uos_id2.id

    return res

答案 5 :(得分:0)

0。安装easy_install

1。在搜索中搜索“编辑系统环境变量”。

2。单击环境变量。

3。在“系统变量”下,单击“路径”,然后单击编辑。

4。单击“新建”。

5。返回并复制python软件包(easy_install)的安装路径,并将其粘贴到此处。

6。单击确定。

7。立即检查它是否有效...