本来打算安装labelme包
from labelme import utils
pycharm导包时发现自动导包失败了。
这也是pycharm一直存在的问题了 。
于是在Terminal使用pip导包,结果报错。报如下错误:
File "C:\Users\Doris\Anaconda3\envs\pytorch\lib\ssl.py", line 807, in _create
raise ValueError("check_hostname requires server_hostname")
ValueError: check_hostname requires server_hostname
查看百度无果,最后发现是开了代理!
关闭代理就可以解决了!!
但是又出了另外一个问题。报如下错误:
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
安装超时,这是因为源的问题,需要更改安装源。代码如下:
pip --default-timeout=100 install labelme -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
终于安装成功了!!
Installing collected packages: imgviz, labelme
Successfully installed imgviz-1.4.0 labelme-4.5.13
舒服了!!