python - 为什么 python setup.py 在 Travis CI 上说无效命令 'b

我的 Python 包有一个 setup.py,当我像这样配置它时,它可以在 Ubuntu Trusty 和新的 Vagrant Ubuntu Trusty 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

但是当我在 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'

这个 Why can I not create a wheel in python?是相关的,但请注意我正在安装轮子并升级 setuptools。

最佳答案

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

pip install wheel

然后

python setup.py bdist_wheel 

工作没有问题。

关于python - 为什么 python setup.py 在 Travis CI 上说无效命令 'bdist_wheel'?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34819221/

相关文章:

python - 如何在 Python 中获取 PATH 环境变量分隔符?

linux - 对于高级用户来说,有哪些优秀的 Linux/Unix 书籍?

python - 如何让 Pylint 识别 NumPy 成员?

python - django 测试应用程序错误 - 创建测试数据库时出错 : permission

python - 从动态导入的模块中的类的字符串名称动态实例化?

android - adb 设备命令不起作用

linux - 如何更改 Ubuntu 中的默认 GCC 编译器?

linux - 发送电子邮件的 Shell 脚本

linux - 我的环境变量是什么?

python - Queue.Queue 与 collections.deque