为什么 python setup.py 在 Travis CI 上说无效命令“bdist_wheel"? [英] Why is python setup.py saying invalid command 'bdist_wheel' on Travis CI?

查看:72
本文介绍了为什么 python setup.py 在 Travis CI 上说无效命令“bdist_wheel"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 Python 包有一个 setup.py,当我像这样配置它时,它可以在 Ubuntu Trusty 和新的 Vagrant Ubuntu Trusty VM 本地构建良好:

My Python package has a setup.py which builds fine locally on Ubuntu Trusty and on a fresh Vagrant Ubuntu Trusty VM when I provision it like this:

sudo apt-get install python python-dev --force-yes --assume-yes --fix-broken
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python2.7
sudo -H pip install setuptools wheel virtualenv --upgrade

但是当我在 Travis CI Trusty Beta VM 上做同样的事情时:

But when I do the same on a Travis CI Trusty Beta VM:

- sudo apt-get install python python-dev --force-yes --assume-yes --fix-broken
- curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python2.7
- sudo -H pip install setuptools wheel virtualenv --upgrade

我明白了:

python2.7 setup.py bdist_wheel
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: invalid command 'bdist_wheel'

这个 为什么我不能在 python 中创建一个轮子? 是相关的,但请注意我正在安装轮子并升级 setuptools.

This Why can I not create a wheel in python? is related but note I am installing wheel and upgrading setuptools.

推荐答案

必须安装 wheel 包.一切都是最新的,但仍然出现错误.

Had to install the wheel package. Everything was up to date but still giving the error.

pip install wheel

然后

python setup.py bdist_wheel 

工作没有问题.

这篇关于为什么 python setup.py 在 Travis CI 上说无效命令“bdist_wheel"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆