axil's blog
  • Home
  • Categories
  • Tags
  • Archives

How to install a python wheel with one doubleclick

To be able to install wheel files with a simple doubleclick on them you can do one the following:

  1. Run this command in cmd.exe under administrator privileges:

    assoc .whl=pythonwheel& ftype pythonwheel=cmd /c pip.exe install -U "%1" ^& pause
    
  2. Alternatively, a similar line can be copied into a wheel.bat file and executed through 'Run as administrator':

    assoc .whl=pythonwheel& ftype pythonwheel=cmd /c pip.exe install -U "%%1" ^& pause
    
  3. or a slightly more verbose wheel-verbose.bat:

    @assoc .whl=pythonwheel|| echo Run me with administrator rights! && pause && exit 1
    @ftype pythonwheel=cmd /c pip.exe install -U "%%1" ^& pause || echo Installation error && pause && exit 1
    @echo Installation successfull & pause
    

PS pip.exe is assumed to be in the PATH.

PPS If you have both python2 and python3 installed and want to install into python3 by default, replace pip with pip3.

  • « Essential Microsoft Excel Keyboard Shortcuts
  • git fast-forward »
Comments
comments powered by Disqus

Published

Dec 3, 2015

Last Updated

2019-12-16 00:41:49.247574+07:00

Category

software

Tags

  • install 1
  • python 4
  • whl 1
  • Powered by Pelican. Theme: Elegant by Talha Mansoor