简体   繁体   English

使用wheel文件安装包时出现Python错误

[英]Python error when installing package using wheel files

I am trying to install pyHook with a wheel file (.whl) but for some reason it keeps giving me this error: 我试图用一个轮文件(.whl)安装pyHook但由于某种原因它不断给我这个错误:

pyHook-1.5.1-cp34-none-win_amd64.whl is not a supported wheel on this platform.

I got the wheel file from this website: 我从这个网站获得了轮子文件:

http://www.lfd.uci.edu/~gohlke/pythonlibs/ http://www.lfd.uci.edu/~gohlke/pythonlibs/

The command I use is: 我使用的命令是:

pip install pyHook-1.5.1-cp34-none-win_amd64.whl

I have no idea what to do, I cant find any suggestions. 我不知道该怎么做,我找不到任何建议。

  • Python version 2.7 Python版本2.7
  • pip version 6.0.6 点数版本6.0.6

You are installing a Wheel created for Python 3.4, into Python 2.7. 您正在为Python 2.7安装为Python创建的Wheel。 That won't work. 那不行。 Use the correct version and download the one with cp27 in the name: 使用正确的版本并下载名称中带有cp27版本:

pyHook‑1.5.1‑cp27‑none‑win_amd64.whl

I ran into the same issues whilst trying to install pyhook on Python 3.4. 尝试在Python 3.4上安装pyhook时遇到了同样的问题。 I downloaded the correct version from python software foundation . 我从python软件基金会下载了正确的版本。

I had to manually change the name of the file from pyHook_3k_compiled-1.5.1-cp34-cp34m-win_amd64.whl to pyHook-1.5.1-cp34-none-win_amd64.whl . 我不得不手动将文件名从pyHook_3k_compiled-1.5.1-cp34-cp34m-win_amd64.whlpyHook-1.5.1-cp34-none-win_amd64.whl

pip install pyHook-1.5.1-cp34-none-win_amd64.whl 

And it worked! 它奏效了!

您可能没有为操作系统安装正确的一个,检查它是32位还是64位变体并重新安装

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM