Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name etree #80

Open
novoid opened this issue Sep 15, 2017 · 4 comments
Open

ImportError: cannot import name etree #80

novoid opened this issue Sep 15, 2017 · 4 comments

Comments

@novoid
Copy link

novoid commented Sep 15, 2017

Hi!

I could not import pyexchange 0.6 (installed via pip install pyexchange on babun/Cygwin on Windows 10) using ipython 2 nor 3:

Python 3.6.1 (default, Mar 24 2017, 12:50:34)
Type "copyright", "credits" or "license" for more information.

IPython 4.2.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import pyexchange
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-62c3fc218f72> in <module>()
----> 1 import pyexchange

/cygdrive/c/python36/lib/site-packages/pyexchange/__init__.py in <module>()
      6 """
      7 import logging
----> 8 from .exchange2010 import Exchange2010Service  # noqa
      9 from .connection import ExchangeNTLMAuthConnection  # noqa
     10

/cygdrive/c/python36/lib/site-packages/pyexchange/exchange2010/__init__.py in <module>()
      9 from ..base.calendar import BaseExchangeCalendarEvent, BaseExchangeCalendarService, ExchangeEventOrganizer, ExchangeEventResponse
     10 from ..base.folder import BaseExchangeFolder, BaseExchangeFolderService
---> 11 from ..base.soap import ExchangeServiceSOAP
     12 from ..exceptions import FailedExchangeException, ExchangeStaleChangeKeyException, ExchangeItemNotFoundException, ExchangeInternalServerTransientErrorException, ExchangeIrresolvableConflictException, InvalidEventType
     13 from ..compat import BASESTRING_TYPES

/cygdrive/c/python36/lib/site-packages/pyexchange/base/soap.py in <module>()
      7 import logging
      8
----> 9 from lxml import etree
     10 from lxml.builder import ElementMaker
     11 from datetime import datetime

ImportError: cannot import name 'etree'

I tried to install etree via pip:

Collecting etree
  Could not find a version that satisfies the requirement etree (from versions: )
No matching distribution found for etree

So I tried ipython2 as well:

Python 2.7.13 (default, Mar 14 2017, 23:27:55)
[GCC 5.4.0] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyexchange
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/cygdrive/c/python36/lib/site-packages/pyexchange/__init__.py", line 8, in <module>
    from .exchange2010 import Exchange2010Service  # noqa
  File "/cygdrive/c/python36/lib/site-packages/pyexchange/exchange2010/__init__.py", line 11, in <module>
    from ..base.soap import ExchangeServiceSOAP
  File "/cygdrive/c/python36/lib/site-packages/pyexchange/base/soap.py", line 9, in <module>
    from lxml import etree
ImportError: cannot import name etree
@jasonWangsk
Copy link

the same to you.....no answer

@novoid
Copy link
Author

novoid commented Oct 16, 2018

@jasonWangsk What is your environment?

@jasonWangsk
Copy link

hi,it's win10 python3.6

@jasonWangsk
Copy link

Use ‘lxml-3.8.0-cp36-cp36m-win32.whl’ problem solved .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants