Question: 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

```

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

```

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 I not create a wheel in python?](https://stackoverflow.com/questions/26664102/why-can-i-not-create-a-wheel-in-python) is related but note I am installing wheel and upgrading setuptools.

Answer: 
in my case, the version of wheel/pip/setuptools created by venv is too old.
this works:

```
venv/bin/pip  install --upgrade pip wheel setuptools

```
Not related to Travis CI but
I ran into similar problem trying to install `jupyter` on my Mac OSX 10.8.5, and none of the other answers was of help. The problem was caused by building the "wheel" for the package called `pyzmq`, with error messages filling hundreds of pages.

The solution I found was to directly install an older version of that package:

```
python -m pip install pyzmq==17 --user

```

After that, the installation of `jupyter` succeded without errors.