title: Read emails and download attachment from Microsoft Exchange Server
body: <p><a href="https://stackoverflow.com/questions/288546/connect-to-exchange-mailbox-with-python/3072491">connect-to-exchange-mailbox-with-python/3072491</a>....I have refereed the following link to connect to Exchange Online and download attachments and read mails on windows(using Python and exchangelib library). Now I want to accomplish the same task on CentOS but when I manually download the <code>exchangelib</code> library and install it. 
  Whenever I try to import exchangelib, it throws an error like:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "exchangelib/__init__.py", line 2, in &lt;module&gt;
      from .account import Account  # noqa
    File "exchangelib/account.py", line 8, in &lt;module&gt;
      from cached_property import threaded_cached_property
  ImportError: No module named cached_property
  </code></pre>
  
  <p>What might be the problem?</p>
  
  <p>My main objective is to read emails and download them. No imap/pop3 server address is available. Is there an alternative to <code>exchangelib</code>?</p>
  
  <pre><code>from exchangelib import DELEGATE, Account, Credentials
  
  credentials = Credentials(
      username='MYWINDOMAIN\\myusername', 
      password='topsecret'
  )
  account = Account(
      primary_smtp_address='john@example.com', 
      credentials=credentials, 
      autodiscover=True, 
      access_type=DELEGATE
  )
  # Print first 100 inbox messages in reverse order
  for item in account.inbox.all().order_by('-datetime_received')[:100]:
      print(item.subject, item.body, item.attachments)
  </code></pre>
  
  <p>I have used this code in Windows. Help me out with Linux.</p>