尝试安装evdev equivalent失败:
Users-MacBook-Air:~ user$ sudo pip install hidapi
The directory '/Users/user/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/user/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting hidapi
Could not fetch URL https://pypi.python.org/simple/hidapi/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) - skipping
Could not find a version that satisfies the requirement hidapi (from versions: )
No matching distribution found for hidapi
使用-H标志进行第二次尝试
Users-MacBook-Air:~ user$ sudo -H pip install hidapi
Could not fetch URL https://pypi.python.org/simple/hidapi/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) - skipping
Could not find a version that satisfies the requirement hidapi (from versions: )
No matching distribution found for hidapi
python -c "import json, urllib2; print json.load(urllib2.urlopen('https://www.howsmyssl.com/a/check'))['tls_version']"
我的TLS版本返回1.0。
答案 0 :(得分:1)
是。安装失败只是意味着它没有安装,因此一个真正的测试将尝试导入模块并且失败。
只要您可以看到大部分或全部错误日志,只需安装即可。
您好像无法访问计算机的Pip目录,可以通过添加--user
标志来解决。而且Pip也找不到您所请求模块的名称。要么是因为它不在PyPi上,要么是因为互联网/ https问题确保它在PyPi上或从.whl
文件安装,这可以通过谷歌搜索找到大多数模块。