Difference between revisions of "Python with WIndows and Cygwin"

From PeformIQ Upgrade
Jump to navigation Jump to search
(Created page with " To be able to install wheel files with a simple doubleclick on them you can do one the following: 1) Run two commands in command line under administrator privileges: <pre...")
 
Line 1: Line 1:




See - http://stackoverflow.com/questions/27885397/how-do-i-install-a-python-package-with-a-whl-file


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

Revision as of 17:13, 28 April 2017


See - http://stackoverflow.com/questions/27885397/how-do-i-install-a-python-package-with-a-whl-file

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

1) Run two commands in command line under administrator privileges:

assoc .whl=pythonwheel
ftype pythonwheel=cmd /c pip.exe install "%1" ^& pause

2) Alternatively, they can be copied into a wheel.bat file and executed with 'Run as administrator' checkbox in the properties.

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

Update:

(1) Those can be combined in one line:

assoc .whl=pythonwheel& ftype pythonwheel=cmd /c pip.exe install -U "%1" ^& pause

(2) Syntax for .bat files is slightly different:

assoc .whl=pythonwheel& ftype pythonwheel=cmd /c pip.exe install -U "%%1" ^& pause

Also its output can be made more verbose:

@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