question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ModuleNotFoundError: No Module named 'dateutil'

See original GitHub issue

Hello,

I am pretty new with python. I am using python3 which I thought boto3 was compatible with. I am getting this error…

Traceback (most recent call last):
  File "application.py", line 2, in <module>
    import boto3
  File "/Users/noahbragg/Library/Python/3.6/lib/python/site-packages/boto3/__init__.py", line 16, in <module>
    from boto3.session import Session
  File "/Users/noahbragg/Library/Python/3.6/lib/python/site-packages/boto3/session.py", line 17, in <module>
    import botocore.session
  File "/Users/noahbragg/Library/Python/3.6/lib/python/site-packages/botocore/session.py", line 26, in <module>
    import botocore.credentials
  File "/Users/noahbragg/Library/Python/3.6/lib/python/site-packages/botocore/credentials.py", line 22, in <module>
    from dateutil.parser import parse
ModuleNotFoundError: No module named 'dateutil'

When I try to run the python application.

I am using pip3 and pip3 freeze shows that I do have boto3 installed…

boto3==1.4.7
botocore==1.7.31
certifi==2017.7.27.1
chardet==3.0.4
click==6.7
docutils==0.14
Flask==0.12.2
Flask-Session==0.3.1
idna==2.6
itsdangerous==0.24
Jinja2==2.9.6
jmespath==0.9.3
MarkupSafe==1.0
python-dateutil==2.6.1
requests==2.18.4
s3transfer==0.1.11
six==1.11.0
stripe==1.62.1
urllib3==1.22
Werkzeug==0.12.2

I import boto3 into my python file like normal. I’m wondering if this is an issue because I am using python3 or because i am using the latest of boto3. Any help would be appreciated! Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ftclausencommented, Nov 29, 2018

I found this was happening because, while I had installed awscli, I had not install boto3. So if you are writing tools that use the AWS libraries then you need boto3 and not just awscli.

1reaction
JordonPhillipscommented, Oct 23, 2017

So that looks like the path to a system level python, not brew python. The traceback seems to match the system python path. The python your pip3 is pointing at could be a different python, but it doesn’t seem likely.

You say you’re new to python. Are you familiar with virtualenv? If not there’s a short guide here. That should help you out with isolating environments.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ModuleNotFoundError: No module named 'dateutil' in Python
The Python "ModuleNotFoundError: No module named 'dateutil'" occurs when we forget to install the python-dateutil module before importing it ...
Read more >
ImportError: No module named dateutil.parser - Stack Overflow
On Ubuntu you may need to install the package manager pip first: sudo apt-get install python-pip. Then install the python-dateutil package with:
Read more >
No module named 'python-dateutil' - Finxter
How to Fix “ModuleNotFoundError: No module named 'python-dateutil'” in PyCharm · Open File > Settings > Project from the PyCharm menu. · Select...
Read more >
Importerror no module named dateutil : Multiple ways to Fix
You may easily fix the error importerror no module named dateutil by installing python-dateutil package via any of the package manager.
Read more >
How to fix ModuleNotFoundError: No module named 'dateutil'
Problem: You want to use the dateutil library in Python, but when you try to import it, you see an exception like this:....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found