python - exchangelib:在 OS X 系统上寻找 winkerberos
问题描述
我正在尝试在 Mac (OS X 10.13.5) 上安装 exchangelib。我在安装时遇到问题,所以我创建了一个最小的工作环境:
pushd /tmp
curl -SLO https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
bash ./Miniconda3-latest-MacOSX-x86_64.sh -b -p /tmp/lxml
source /tmp/lxml/bin/activate
conda create -n py35 python=3.5 lxml -y
source activate py35
然后我在那个环境中安装了 exchangelib。但是,当我尝试使用它时,我发现它正在尝试加载 winkerberos 而不是 pykerberos。
>>> import exchangelib
Traceback (most recent call last):
File "/tmp/lxml/envs/py35/lib/python3.5/site-packages/requests_kerberos/kerberos_.py", line 2, in <module>
import kerberos
ImportError: dlopen(/tmp/lxml/envs/py35/lib/python3.5/site-packages/kerberos.cpython-35m-darwin.so, 2): Symbol not found: _mempcpy
Referenced from: /tmp/lxml/envs/py35/lib/python3.5/site-packages/kerberos.cpython-35m-darwin.so
Expected in: flat namespace
in /tmp/lxml/envs/py35/lib/python3.5/site-packages/kerberos.cpython-35m-darwin.so
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/tmp/lxml/envs/py35/lib/python3.5/site-packages/exchangelib/__init__.py", line 4, in <module>
from .account import Account
File "/tmp/lxml/envs/py35/lib/python3.5/site-packages/exchangelib/account.py", line 12, in <module>
from exchangelib.services import GetUserOofSettings, SetUserOofSettings
File "/tmp/lxml/envs/py35/lib/python3.5/site-packages/exchangelib/services.py", line 37, in <module>
from .transport import wrap, extra_headers, SOAPNS, TNS, MNS, ENS
File "/tmp/lxml/envs/py35/lib/python3.5/site-packages/exchangelib/transport.py", line 9, in <module>
import requests_kerberos
File "/tmp/lxml/envs/py35/lib/python3.5/site-packages/requests_kerberos/__init__.py", line 17, in <module>
from .kerberos_ import HTTPKerberosAuth, REQUIRED, OPTIONAL, DISABLED
File "/tmp/lxml/envs/py35/lib/python3.5/site-packages/requests_kerberos/kerberos_.py", line 4, in <module>
import winkerberos as kerberos
ImportError: No module named 'winkerberos'
>>>
我在这里有点不知所措。任何想法如何让安装不寻找winkerberos?
解决方案
看起来它正在尝试首先加载 pykerberos,但由于库问题(未找到符号:_mempcpy)而失败,并且作为后备尝试加载未找到的 winkerberos。一旦您可以使系统上的 pykerberos 工作,这应该开始工作。
推荐阅读
- asp.net-core - ASP.NET CORE 如何将项目从输入发送到数据库并在同一页面上查看
- angular - 无法访问插值 {{}} 设置的输入字段值
- r - 如何计算 r 中 dna 序列中“ATC”的数量
- java - 计算 Android 应用程序运行时间
- c# - StackOverflowException while getting screenshots in C#
- python - 使用 embedding_vector 实现 Word2Vec 模型时出错
- arrays - Cuda 你如何使用带有 __constant__ 的指针数组
- alexa-skills-kit - Alexa Skills 的 AWS 账户计费
- reactjs - 为什么大型平面列表很慢?如何使用 shouldComponentUpdate?
- django - Django psycopg2 游标不存在