[Distutils] Installing from a wheel

Oscar Benjamin oscar.j.benjamin at gmail.com
Wed Aug 21 14:59:30 CEST 2013


This is the first time that I've tested using wheels and I have a
couple of questions.

Here's what I did (is this right?):

$ cat spam.py
# spam.py
print('running spam from:', __file__)
$ cat setup.py
from setuptools import setup

setup(name='spam',
      version='1.0',
      py_modules=['spam'])

$ python setup.py bdist_wheel
running bdist_wheel
    ...
creating build\bdist.win32\wheel\spam-1.0.dist-info\WHEEL
$ ls
build  dist  setup.py  spam.egg-info  spam.py
$ ls dist/
spam-1.0-py27-none-any.whl

Okay, so far so good. I have the wheel and everything makes sense. Now
I want to test installing it:

$ wheel install --wheel-dir=./dist/ spam

The line above gives no output. I expect something like 'installing
spam... installed.'. It also ran so quickly that I thought that
nothing had happened.

A quick check reveals that the module was installed:

$ cd ~
$ python -m spam
('running spam from:', 'q:\\tools\\Python27\\lib\\site-packages\\spam.py')
$ pip list | grep spam
spam (1.0)

So now how do I uninstall it?

$ pip uninstall spam
Can't uninstall 'spam'. No files were found to uninstall.

The wheel command doesn't seem to have an uninstall option either.


Oscar


More information about the Distutils-SIG mailing list