【问题标题】:Installing Python package: setup.py install - error: no commands supplied安装 Python 包:setup.py install - 错误:未提供命令
【发布时间】:2016-02-27 10:43:50
【问题描述】:
  • 我正在尝试在 Windows 7 中安装 python-pptx-0.5.7 包。 我所做的如下:

       1) Downloaded the python-pptx-0.5.7.tar file from website.
       2) Unzipped it and kept it in the Python34/Script folder.
       3) I used command prompt to install the package as
       setup.py install.
    
       Here is the ouptput of the command that I wrote in command prompt
    
       c:\Python34\Scripts\python-pptx-0.5.7>setup.py install
       usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: setup.py --help [cmd1 cmd2 ...]
       or: setup.py --help-commands
       or: setup.py cmd --help
    
    
    
       error: no commands supplied.
    

    使用“pip”的第二种方法

           c:\Python34\Scripts>pip install python-pptx
    

    采集python-pptx 下载 python-pptx-0.5.7.ta​​r.gz (5.2MB) 100% |################################| 5.2MB 25kB/s 收集 lxml>=3.1.0(来自 python-pptx) 下载 lxml-3.5.0.tar.gz (3.8MB) 100% |################################| 3.8MB 41kB/s 已满足要求(使用 --upgrade 升级):c:\python34\lib\site-packages 中的 Pillow>=2.6.1(来自 python-pptx) 收集 XlsxWriter>=0.5.7(来自 python-pptx) 下载 XlsxWriter-0.7.7-py2.py3-none-any.whl (133kB) 100% |################################| 135kB 62kB/s 为收集的包构建轮子:python-pptx、lxml 为 python-pptx 运行 setup.py bdist_wheel 存放在目录:C:\Users\praveen\AppData\Local\pip\Cache\wheels\1f\fa\42\ bbc04bb0ef4be4cd49f228cc1fa3280bb99c1a37d3b193b81b 为 lxml 运行 setup.py bdist_wheel 错误:需要 Microsoft Visual C++ 10.0(无法找到 vcvarsall.bat)。


    lxml 构建轮子失败 成功搭建python-pptx 构建 lxml 失败 错误:b"'xslt-config' 未被识别为内部或外部命令, \r\n可运行的程序或批处理文件。\r\n" ** 确保已安装 libxml2 和 libxslt 的开发包**

【问题讨论】:

    标签: python


    【解决方案1】:

    follow the official Python package installation guide

    软件包应该安装如下:

    pip install python-pptx
    

    从 pypi.python.org 自动下载。

    【讨论】:

    • 我真的很欣赏替代方案,但“pip install python-pptx”在 Windows 64 位的 python 3.4.2 中不起作用。我仅使用 pip 安装所有其他软件包,但此软件包无法在 python 3.4.2 中安装
    • 此外,当我在办公室时,上述相同的命令“setup.py install”工作得非常好,而当我在我的个人笔记本电脑上做同样的事情时,它根本不工作。
    • 您能否编辑您的问题并提供您键入的完整 pip 命令和该命令的完整输出?
    • @PratikChhapolika:您将其标记为已解决。你设法解决了这个问题吗?
    • 未解决。我已经粘贴了输出,虽然格式不好。
    猜你喜欢
    • 1970-01-01
    • 2021-05-20
    • 2016-04-24
    • 1970-01-01
    • 1970-01-01
    • 2018-12-03
    • 2018-01-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多