简体   繁体   English

安装 Python package: setup.py install - error: no commands supplied

[英]Installing Python package: setup.py install - error: no commands supplied

  • I am trying to install python-pptx-0.5.7 package in windows 7. What I did is as follows:我正在尝试在 windows 7 中安装 python-pptx-0.5.7 package。我所做的如下:

     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.

    The second approach using "pip"第二种方法使用“pip”

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

    Collecting python-pptx Downloading python-pptx-0.5.7.tar.gz (5.2MB) 100% |################################|收集 python-pptx 下载 python-pptx-0.5.7.tar.gz (5.2MB) 100% |########################### #####| 5.2MB 25kB/s Collecting lxml>=3.1.0 (from python-pptx) Downloading lxml-3.5.0.tar.gz (3.8MB) 100% |################################| 5.2MB 25kB/s 收集 lxml>=3.1.0 (来自 python-pptx) 下载 lxml-3.5.0.tar.gz (3.8MB) 100% |############### #################| 3.8MB 41kB/s Requirement already satisfied (use --upgrade to upgrade): Pillow>=2.6.1 in c:\python34\lib\site-packages (from python-pptx) Collecting XlsxWriter>=0.5.7 (from python-pptx) Downloading XlsxWriter-0.7.7-py2.py3-none-any.whl (133kB) 100% |################################| 3.8MB 41kB/s 要求已满足(使用 --upgrade 升级): Pillow>=2.6.1 in c:\python34\lib\site-packages (from python-pptx) Collecting XlsxWriter>=0.5.7 (from python -pptx) 下载 XlsxWriter-0.7.7-py2.py3-none-any.whl (133kB) 100% |######################### #######| 135kB 62kB/s Building wheels for collected packages: python-pptx, lxml Running setup.py bdist_wheel for python-pptx Stored in directory: C:\Users\praveen\AppData\Local\pip\Cache\wheels\1f\fa\42\ bbc04bb0ef4be4cd49f228cc1fa3280bb99c1a37d3b193b81b Running setup.py bdist_wheel for lxml error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat). 135kB 62kB/s 构建 wheels 收集包:python-pptx, lxml running setup.py bdist_wheel for python-pptx 存储在目录:C:\Users\praveen\AppData\Local\pip\Cache\wheels\1f\fa\42 \ bbc04bb0ef4be4cd49f228cc1fa3280bb99c1a37d3b193b81b 运行 lxml 错误的 setup.py bdist_wheel:需要 Microsoft Visual C++ 10.0(无法找到 vcvarsall.bat)。


    Failed building wheel for lxml Successfully built python-pptx Failed to build lxml ERROR: b"'xslt-config' is not recognized as an internal or external command, \r\noperable program or batch file.\r\n" ** make sure the development packages of libxml2 and libxslt are installed ** lxml 构建轮失败成功构建 python-pptx 构建 lxml 失败错误:b"'xslt-config' 未被识别为内部或外部命令,\r\no 可操作程序或批处理文件。\r\n" ** make确保安装了 libxml2 和 libxslt 的开发包 **

Please follow the official Python package installation guide . 遵循官方的Python软件包安装指南

Packages should be installed like: 软件包应安装如下:

pip install python-pptx

Download is automatic from pypi.python.org. 从pypi.python.org自动下载。

error: command '/usr/bin/clang' failed with exit code 69 [end of output]错误:命令“/usr/bin/clang”失败,退出代码为 69 [输出结束]

note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure注意:此错误源自子进程,可能不是 pip 的问题。错误:legacy-install-failure

× Encountered error while trying to install package. ╰─> lxml × 尝试安装 package 时遇到错误。╰─> lxml

note: This is an issue with the package mentioned above, not pip.注意:这是上面提到的package的问题,不是pip。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM