3

This is my first question on this site so I hope I format this correctly. I also am very new to programming so bear with my lack of knowledge, thank you!

I'm trying to install pyHook like so and I keep getting this error message:

C:\Python27>py -2.7 -m pip install pyHook-1.5.1-cp27-cp27M-win_amd64.whl
pyHook-1.5.1-cp27-cp27M-win_amd64.whl is not a supported wheel on this platform.

I have python 2.7.14 as you can see from below:

Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit 
(AMD64)] on win32

Just in case, I tried updating pip and It said it was up to date. I also tried install this version of the .whl and I get the same error:

C:\Python27>py -2.7 -m pip install pyHook-1.5.1-cp27-cp27m-win32.whl
pyHook-1.5.1-cp27-cp27m-win32.whl is not a supported wheel on this platform.

From reading online I believe cp27 indicates its for python 2.7 and to be safe I tried the 64 bit and 32 bit files, but nothing seems to work. If anyone could offer up any solutions or advice, it would be greatly appreciated!

  • What is your pip's version? `py -2.7 -m pip --version` – phd Nov 18 '17 at 19:48
  • `pip 9.0.1 from c:\python27\lib\site-packages (python 2.7)` is what comes up –  Nov 19 '17 at 02:47
  • I'm having the same problem. so please, someone give an answer. – Hashbrowns Apr 12 '18 at 00:28
  • Are you on 32 or 64 bit OS? Also what OS are you on, Linux, Mac, or Windows variant – Steve Byrne Apr 12 '18 at 00:33
  • 64 bit Windows 10 – Hashbrowns Apr 12 '18 at 01:28
  • @Br0therBrigham what do `py -2.7 -c "import pip; print(pip.pep425tags.get_platform())"` and `py -2.7 -c "import pip; print(pip.pep425tags.get_abi_tag())"` return? Also, what wheels do you use for installing? I don't see any wheels for `pyHook` uploaded on PyPI. – hoefling Apr 13 '18 at 16:03
  • @hoefling the first one returned "win32" and the second one returned "cp27m". and I'm new to python and I don't really know what Wheels are. – Hashbrowns Apr 14 '18 at 22:14
  • @Br0therBrigham so you need a `cp27-cp27m-win32` wheel. Run `py -2.7 -m pip install https://download.lfd.uci.edu/pythonlibs/u2yrk7ps/pyHook-1.5.1-cp27-cp27m-win32.whl`, do you get a clean install? – hoefling Apr 15 '18 at 15:41
  • @hoefling I get a Client error. – Hashbrowns Apr 16 '18 at 18:13
  • @Br0therBrigham what client error? can you elaborate? Please post the complete error trace. – hoefling Apr 16 '18 at 18:17
  • @hoefling the error trace is too long for a comment. but this is the first half. HTTP error 404 while getting https://download.lfd.uci.edu/pythonlibs/u2yrk7ps/pyHook-1.5.1-cp27-cp27m-win32.whl Could not install requirement pyHook==1.5.1 from https://download.lfd.uci.edu/pythonlibs/u2yrk7ps/pyHook-1.5.1-cp27-cp27m-win32.whl because of error 404 Client Error: Not Found for url: https://download.lfd.uci.edu/pythonlibs/u2yrk7ps/pyHook-1.5.1-cp27-cp27m-win32.whl – Hashbrowns Apr 18 '18 at 01:29
  • Hmm, indeed the website is also not available for me. I uploaded the files to a mirror on Github, try this one out: `py -2.7 -m pip install https://github.com/hoefling/pyhook-wheels/raw/master/pyHook-1.5.1-cp27-cp27m-win32.whl`. – hoefling Apr 18 '18 at 08:18

2 Answers2

1

I installed Python 2.7, then pyHook and was able to get it working following these exact steps.

Note, I was using Anaconda to create the Python 2.7 environment and Windows 10 is my OS.

  1. conda create -n python27 python=2.7 This created a new conda environment with python 2.7.14.
  2. activate python27
  3. python -m pip install --upgrade pip This installed pip version 10.0.0
  4. Downloaded pyHook from the unofficial windows binaries.
    • Specifically: pyHook-1.5.1-cp27-cp27m-win_amd64.whl
  5. Navigated to downloads folder in command prompt
  6. pip install pyHook-1.5.1-cp27-cp27m-win_amd64.whl

That installed it properly with no error messages. Hope that helps. My guess is that the new pip version fixes it, or there is a problem with how you are installing Python 2.7, so try Anaconda (or miniconda if you want to keep it light)

I was also able to import it with no problem after these steps.

Chris Farr
  • 3,580
  • 1
  • 21
  • 24
  • I have installed other libraries such as Pillow. so I don't think it has anything to do with pythons installation. pip is also updated to the newest version. – Hashbrowns Apr 18 '18 at 01:39
  • Considering I was able to get it to work on my machine following those exact steps it could be worth a try, starting with using a conda environment. – Chris Farr Apr 18 '18 at 02:01
-1

Many binaries depend on numpy-1.13+mkl and the Microsoft Visual C++ 2008 (x64, x86, and SP1 for CPython 2.7), Visual C++ 2010 (x64, x86, for CPython 3.4), or the Visual C++ 2017 (x64 or x86 for CPython 3.5, 3.6, and 3.7) redistributable packages.

Install numpy+mkl before other packages that depend on it.

I have Microsoft Visual C++ 2008.I just do this,

python -m pip install numpy-1.13.3+mkl-cp27-cp27m-win_amd64.whl

python -m pip install pyHook-1.5.1-cp27-cp27m-win_amd64.whl

then it work.

obgnaw
  • 3,007
  • 11
  • 25
  • Wheels with precompiled extensions don't need any compilers to be installed. That's the reason why they exist in the first place. Also, `pyHook` doesn't depend on `numpy`, so this answer is completely wrong. – hoefling Apr 15 '18 at 15:47
  • @hoefling There are some hack in numpy which will deal with 32bit and 64bit incompatibility. – obgnaw Apr 17 '18 at 01:35