首页 > 解决方案 > PermissionError (WinError 31) 连接到系统的设备无法正常工作

问题描述

我正在尝试python get-pip.py在我的 python3.6 virtualenv 上通过命令安装 pip,但出现错误:

(myvenv_python3) C:\Users\Kaleab\Downloads>python get-pip.py --trusted-host=pypi
.org
Collecting pip
  Downloading https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b
44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl (1.3MB)

Could not install packages due to an EnvironmentError: [WinError 31] A device at
tached to the system is not functioning
Consider using the `--user` option or check the permissions.

Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-
8'>
PermissionError: [WinError 31] A device attached to the system is not functionin
g

(myvenv_python3) C:\Users\Kaleab\Downloads>

你会推荐什么解决方案?我正在使用 Windows 8.1 机器。

标签: pythonpipwindows-8.1

解决方案


我在 Windows 7 上。我遇到了同样的错误。我在这里阅读了讨论。如果您有英文 Windows,这似乎是由 UTF-8 支持引起的。

只需输入:

chcp 1252

然后再次运行您的点子。


推荐阅读