python - 使用 pip 安装 pyejabberd 时出现错误
问题描述
我正在尝试安装 pyejabberd ( https://pypi.org/project/pyejabberd/ ),但在使用py -3 -m pip install pyejabberd
.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
完整错误如下:
Collecting pyejabberd
Using cached https://files.pythonhosted.org/packages/15/f4/658ade66dbaf4db6484ba81f6c1015b6ff653debcee3310c52e3d0a17641/pyejabberd-0.2.11-py2.py3-none-any.whl
Collecting enum34==1.1.2 (from pyejabberd)
Using cached https://files.pythonhosted.org/packages/6f/e9/08fd439384b7e3d613e75a6c8236b8e64d90c47d23413493b38d4229a9a5/enum34-1.1.2.tar.gz
ERROR: Command errored out with exit status 1:
command: 'C:\Users\USER\AppData\Local\Programs\Python\Python37-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pip-install-_217wclq\\enum34\\setup.py'"'"'; __file__='"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pip-install-_217wclq\\enum34\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: C:\Users\USER\AppData\Local\Temp\pip-install-_217wclq\enum34\
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\USER\AppData\Local\Programs\Python\Python37-32\lib\site-packages\setuptools\__init__.py", line 6, in <module>
import distutils.core
File "C:\Users\USER\AppData\Local\Programs\Python\Python37-32\lib\distutils\core.py", line 16, in <module>
from distutils.dist import Distribution
File "C:\Users\USER\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py", line 9, in <module>
import re
File "C:\Users\USER\AppData\Local\Programs\Python\Python37-32\lib\re.py", line 143, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
解决方案
首先确保您当前安装的 Python 版本使用python -V
. 您必须检查“pyejabberd”文档,它与 python 2.6、2.7、3.3、3.4 版本兼容。
推荐阅读
- google-analytics - Google Analytics/DTM 未提取正确的点击网址
- postgresql - 如何删除一列的重复项,但根据另一列的值选择要删除的列(Postgres)
- azure-devops - 如何触发管道从分支开始
- c# - 如何在通用表模板内的 Blazor WebAssembly 中的 Virtualize 组件中指定 TItem 的类型
- android-sqlite - 在数据库中存储和检索的奇怪值
- python - 为什么我不能使用 transforms.ifft2?
- selenium-webdriver - Robot Framework 无法通过 SeleniumLibrary 找到元素
- c# - 尝试使用 C# 代码将数据输入到访问文件时出现无效的 Sql 语句错误
- r - 对重复行的列求和
- android - 如何在 android 的 ConstraintLayout 中设置固定页眉页脚和可滚动正文