I am attempting to install exchangelib on a Mac (OS X 10.13.5). I was having issues with the install, so I created a minimal environment in which to work:
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
I then installed exchangelib within that environment. When I attempt to use it, though, I find that it's trying to load winkerberos instead of 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'
>>>
I'm kind of at a loss here. Any ideas how to get the install to not look for winkerberos?
It looks like it is trying to load pykerberos first, which fails with a library issue (Symbol not found: _mempcpy) and as a fallback tries to load winkerberos, which it does not find. This should start working as soon as you can make the pykerberos on your system work.
Related
Error Message:
Traceback (most recent call last):
File "/home/upboard/visioonbot/Connect4Py/connect4.py", line 7, in <module>
import dbus
File "/home/upboard/visioonbot/Connect4Py/venv/lib/python3.6/site-packages/dbus/__init__.py", line 77, in <module>
import dbus.types as types
File "/home/upboard/visioonbot/Connect4Py/venv/lib/python3.6/site-packages/dbus/types.py", line 6, in <module>
from _dbus_bindings import (
File "/home/upboard/visioonbot/Connect4Py/venv/lib/python3.6/site-packages/_dbus_bindings/__init__.py", line 13, in <module>
import dbus.lowlevel as __dbus_lowlevel
File "/home/upboard/visioonbot/Connect4Py/venv/lib/python3.6/site-packages/dbus/lowlevel.py", line 32, in <module>
from _dbus_bindings import (
File "/home/upboard/visioonbot/Connect4Py/venv/lib/python3.6/site-packages/_dbus_bindings/ErrorMessage.py", line 13, in <module>
import dbus.lowlevel as __dbus_lowlevel
AttributeError: module 'dbus' has no attribute 'lowlevel'
Process finished with exit code 1
Here are the dbus files mentioned in the error path:
and the dbus_bindings files:
What is missing? How to solve this issue?
I've already reinstalled the packages using
sudo apt install python3-dbus
and
sudo apt-get install -y python-dbus
It looks like your issue might be that you are using a venv. python3-dbus does not play nicely with venv's.
You can try using --system-site-packages as suggested in https://stackoverflow.com/a/13367493/7721752.
Or use pydbus and vext.gi
I just installed anaconda and I have udpated the PATH variable.
However, I cannot run any conda related commands.
Every time I run a command starting with "conda" I get the following error.
Can anyone help?
I am using macOs High Sierra 10.13.6.
Traceback (most recent call last):
File "/anaconda3/lib/python3.6/site-packages/conda/common/path.py", line 18, in <module>
from urllib.request import url2pathname
File "/anaconda3/lib/python3.6/urllib/request.py", line 2585, in <module>
from _scproxy import _get_proxy_settings, _get_proxies
ImportError: dlopen(/anaconda3/lib/python3.6/lib-dynload/_scproxy.cpython-36m-darwin.so, 2): Symbol not found: __cg_jpeg_resync_to_restart
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /anaconda3/lib/libJPEG.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/anaconda3/bin/conda", line 11, in <module>
sys.exit(main())
File "/anaconda3/lib/python3.6/site-packages/conda/cli/main.py", line 112, in main
from ..exceptions import conda_exception_handler
File "/anaconda3/lib/python3.6/site-packages/conda/exceptions.py", line 18, in <module>
from .common.io import timeout
File "/anaconda3/lib/python3.6/site-packages/conda/common/io.py", line 24, in <module>
from .path import expand
File "/anaconda3/lib/python3.6/site-packages/conda/common/path.py", line 21, in <module>
from urllib import unquote, url2pathname # NOQA
ImportError: cannot import name 'unquote'
I seem to recall something similar when I first ran Anaconda on my Mac as well. I believe I solved it by doing two things:
Uninstalling Anaconda (Link)
Reinstalling Anaconda (potentially in a different location, say, under your User home)
I think in the process of installation my PATH pointed finally to a different location than the Conda/Python install.
I'm using terminal on mac, and anytime I attempt to use pip, I get the following error message telling me that it cannot find a module named zlib:
$ pip --version
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/requests/packages/__init__.py", line 27, in <module>
from . import urllib3
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py", line 8, in <module>
from .connectionpool import (
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 42, in <module>
from .response import HTTPResponse
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 3, in <module>
import zlib
ModuleNotFoundError: No module named 'zlib'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/bin/pip", line 7, in <module>
from pip import main
File "/usr/local/lib/python3.6/site-packages/pip/__init__.py", line 21, in <module>
from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/requests/__init__.py", line 62, in <module>
from .packages.urllib3.exceptions import DependencyWarning
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/requests/packages/__init__.py", line 29, in <module>
import urllib3
File "/usr/local/lib/python3.6/site-packages/urllib3/__init__.py", line 8, in <module>
from .connectionpool import (
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 36, in <module>
from .response import HTTPResponse
File "/usr/local/lib/python3.6/site-packages/urllib3/response.py", line 3, in <module>
import zlib
ModuleNotFoundError: No module named 'zlib'
I've read several SO posts with the same error message, and have tried their solutions, including attempting to install zlib using homebrew, which fails, and updating my Xcode developer tools. I also installed pip earlier using python get-pip.py, and it said it installed successfully.
The reason I need pip is to install a package for use on python 2.7, but doing $ pip install "package-name" produces the same error as above. I have both Python 2 and 3 installed on my machine, if that helps. I'm kind of new to pip and using the command line in general, and I'm super confused; if anyone could help me out I'd really appreciate it.
This is the OP. I was able to fix the issue, and wanted to post my solution here in case it would help others.
Essentially I believe it occurred because Python2 is default on my machine, but pip is by default pointing to resources pertaining to Python3, or something like that. Doing pip2 --version instead provided the expected response.
I am trying to use turicreate. I installed it on my device (sudo python2.7 -m pip install turicreate) And when I ran my code (in terminal on Mac), I got a long error message. I believe that the significant part is as follows:
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/turicreate/cython/cy_unity.so, 2): Symbol not found: _syslog$DARWIN_EXTSN
Here is the integrity of it for reference:
Traceback (most recent call last):
File "classifier.py", line 1, in <module>
import turicreate as turi
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/turicreate/__init__.py", line 30, in <module>
from turicreate.data_structures.sgraph import Vertex, Edge
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/turicreate/data_structures/__init__.py", line 18, in <module>
from . import sframe
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/turicreate/data_structures/sframe.py", line 16, in <module>
from ..connect import main as glconnect
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/turicreate/connect/main.py", line 13, in <module>
from ..cython.cy_unity import UnityGlobalProxy
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/turicreate/cython/cy_unity.so, 2): Symbol not found: _syslog$DARWIN_EXTSN
Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/turicreate/cython/../libunity_shared.dylib (which was built for Mac OS X 10.13)
Expected in: /usr/lib/libSystem.B.dylib
in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/turicreate/cython/../libunity_shared.dylib
What is the problem here?
This article provides a detailed explanation of setting up Python environment for popular ML packages on Mac - Machine Learning Compass
I'm trying to install couchdb app on debian using the following command
couchapp push http://user:pass#localhost:5984/acra-appname
and I'm having the following error output:
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/restkit/__init__.py", line 9, in <module>
from restkit.conn import Connection
File "/usr/local/lib/python2.6/dist-packages/restkit/conn.py", line 14, in <module>
from socketpool import Connector
ImportError: No module named socketpool
Traceback (most recent call last):
File "/usr/local/bin/couchapp", line 7, in <module>
from couchapp.dispatch import run
File "/usr/local/lib/python2.6/dist-packages/couchapp/dispatch.py", line 10, in <module>
import couchapp.commands as commands
File "/usr/local/lib/python2.6/dist-packages/couchapp/commands.py", line 15, in <module>
from couchapp import clone_app
File "/usr/local/lib/python2.6/dist-packages/couchapp/clone_app.py", line 15, in <module>
from couchapp.errors import AppError
File "/usr/local/lib/python2.6/dist-packages/couchapp/errors.py", line 7, in <module>
from restkit import ResourceError
ImportError: cannot import name ResourceError
As far as I understand the error is:
ImportError: No module named socketpool
How can I install this module or how to resolve the problem?
As Ifthikhan sugessted: Install it using a package manager such as apt-get and thereafter using pip you can install socketpool.
I had this problem when installing couchapp. I used pip to install it, and I thought it completed, but when I ran it I had the ImportError problem. Turns out the pip install didn't succeed and I first needed to:
apt-get install python-dev
Then when I did a
pip install couchapp
all of the dependencies were installed and couchapp ran without a problem.