Why is python setup.py saying invalid command 'bdist_wheel' on Travis CI? -


my python package has setup.py builds fine locally on ubuntu trusty , on fresh vagrant ubuntu trusty vm when provision 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 

but when same on 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 

i get:

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' 

this why can not create wheel in python? related note installing wheel , upgrading setuptools.

this problem due to:

  • an old version of pip (6.1.1) being installed python 2.7
  • multiple copies of python 2.7 installed on trusty beta image
  • a different location python 2.7 being used sudo

it's bit complicated , better explained here https://github.com/travis-ci/travis-ci/issues/4989.

my solution install user travis instead of sudo:

- pip2.7 install --upgrade --user travis pip setuptools wheel virtualenv 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -