python安装其他包_python非官方的windows安装包资源站及安装方...

有时候用pip 安装python 库时会找不到合适的安装包文件,这时可以尝试用一些非官方的安装包。

这里有一个非官方安装包的资源站点,提供了windows下的 whl 安装文件

接下来通过一个例子说明具体用法。

准备在python3.7上安装 PyUserInput。这个库可以用来模拟键盘及鼠标的操作。

先尝试用pip 安装

D:\Python37\Scripts>pip install PyUserInput

Collecting PyUserInput

Downloading https://files.pythonhosted.org/packages/d0/09/17fe0b16c7eeb52d6c14e904596ddde82503aeee268330120b595bf22d7b/PyUserInput-0.1.11.tar.gz

Collecting pyHook (from PyUserInput)

Could not find a version that satisfies the requirement pyHook (from PyUserInput) (from versions: )

No matching distribution found for pyHook (from PyUserInput)

从错误提示可以发现,无法自动安装依赖项 pyHook。

于是打开上面介绍的资源站点

按下Ctrl+F ,在页面上查找 pyhook

20190809092257577.png

找到后点击跳转到下载链接

20190809092358560.png

如上图红色标记所示,我的电脑是64位系统,找到与我的电脑匹配的 pyHook?1.5.1?cp37?cp37m?win_amd64.whl,并下载,保存到python3.7 安装文件夹 Scripts 目录中。

执行下面的语句安装这个下载得到的whl文件:

pip install pyHook-1.5.1-cp37-cp37m-win_amd64.whl

运行提示如下:

D:\Python37\Scripts>pip install pyHook-1.5.1-cp37-cp37m-win_amd64.whl

Processing d:\python37\scripts\pyhook-1.5.1-cp37-cp37m-win_amd64.whl

Installing collected packages: pyHook

Successfully installed pyHook-1.5.1

说明pyHook已经安装好了,接下来再次执行 pip install PyUserInput ,看看是否还有问题

D:\Python37\Scripts>pip install PyUserInput

Collecting PyUserInput

Using cached https://files.pythonhosted.org/packages/d0/09/17fe0b16c7eeb52d6c14e904596ddde82503aeee268330120b595bf22d7b/PyUserInput-0.1.11.tar.gz

Requirement already satisfied: pyHook in d:\python37\lib\site-packages (from PyUserInput) (1.5.1)

Requirement already satisfied: pywin32 in d:\python37\lib\site-packages (from PyUserInput) (224)

Installing collected packages: PyUserInput

Running setup.py install for PyUserInput ... done

Successfully installed PyUserInput-0.1.11

安装完成,一切OK

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值