I\'m having trouble installing a Python package on my Windows machine, and would like to install it with Christoph Gohlke\'s Window binaries. (Which, to my experience, allev
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
see my blog post for details.
I would be suggesting you the exact way how to install .whl file. Initially I faced many issues but then I solved it, Here is my trick to install .whl files.
Follow The Steps properly in order to get a module imported
cd c:\python 3.7
3.Now, enter the command written below
>py -3.7(version name) -m pip install (file name).whl
Click enter and make sure you enter the version you are currently using with correct file name.
Once you press enter, wait for few minutes and the file will be installed and you will be able to import the particular module.
In order to check if the module is installed successfully, import the module in idle and check it.
Thank you:)
There's a slight difference between accessing the .whl file in python2 and python3.In python3 you need to install wheel first and then you can access .whl files.
Python3
pip install wheel
And then by using wheel
wheel unpack some-package.whl
Python2
pip install some-package.whl
On Windows you can't just upgrade using pip install --upgrade pip
, because the pip.exe
is in use and there would be an error replacing it. Instead, you should upgrade pip
like this:
easy_install --upgrade pip
Then check the pip
version:
pip --version
If it shows 6.x
series, there is wheel support.
Only then, you can install a wheel package like this:
pip install your-package.whl
Download the package (.whl).
Put the file inside the script folder of python directory
C:\Python36\Scripts
Use the command prompt to install the package.
C:\Python36\Scripts>pip install package_name.whl