首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何修正"[WinError 10013]试图以其访问权限禁止的方式访问套接字“?

如何修正"[WinError 10013]试图以其访问权限禁止的方式访问套接字“?
EN

Stack Overflow用户
提问于 2022-10-15 20:29:17
回答 1查看 101关注 0票数 0

我需要阅读并获得.docx中段落的样式(在本例中为强),因此我尝试使用以下方法安装python-docx包(anacondapv3.9和pv2.7)

代码语言:javascript
运行
复制
pip install python-docx

但我得到的错误如下:

代码语言:javascript
运行
复制
(python27) C:\Users\Alberto\.anaconda>pip install python-docx
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000000000476D148>: Failed to establish a new connection: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions',)': /simple/python-docx/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000000000476D6C8>: Failed to establish a new connection: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions',)': /simple/python-docx/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000000000476DAC8>: Failed to establish a new connection: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions',)': /simple/python-docx/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000000000476DEC8>: Failed to establish a new connection: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions',)': /simple/python-docx/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000000000479D308>: Failed to establish a new connection: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions',)': /simple/python-docx/
ERROR: Could not find a version that satisfies the requirement python-docx (from versions: none)
ERROR: No matching distribution found for python-docx

在python3.9中:

代码语言:javascript
运行
复制
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002BEA5A7CBE0>: Failed to establish a new connection: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions')': /simple/python-docx/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002BEA219DB80>: Failed to establish a new connection: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions')': /simple/python-docx/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002BEA5A78F70>: Failed to establish a new connection: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions')': /simple/python-docx/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002BEA5A78D60>: Failed to establish a new connection: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions')': /simple/python-docx/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002BEA59DC250>: Failed to establish a new connection: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions')': /simple/python-docx/
ERROR: Could not find a version that satisfies the requirement python-docx (from versions: none)
ERROR: No matching distribution found for python-docx
EN

回答 1

Stack Overflow用户

发布于 2022-10-15 20:42:42

如果这个版本对你有用,你能试一下这个版本并更新吗?

代码语言:javascript
运行
复制
pip install python-docx=0.8.11

我试着在python3.9上安装,这个版本对我有用。

干杯..。

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74082776

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档