Navigation Menu

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

ruamel.yaml ImportError #260

Closed
brianckeegan opened this issue Dec 10, 2016 · 10 comments
Closed

ruamel.yaml ImportError #260

brianckeegan opened this issue Dec 10, 2016 · 10 comments
Assignees
Labels

Comments

@brianckeegan
Copy link

brianckeegan commented Dec 10, 2016

I am attempting to use dateparser 0.5.0 on an Anaconda 2.7.12 on Windows 10.

$ pip install dateparser
...
Successfully installed 
dateparser-0.5.0
jdatetime-1.8.1 
regex-2016.11.21 
ruamel.ordereddict-0.4.9 
ruamel.yaml-0.13.4
typing.3.5.2.2 
tzlocal-1.3 
umalqurra-0.2

$ ipython
>>> import dateparser
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-29-41cf525f5b76> in <module>()
----> 5 import dateparser

\Anaconda2\lib\site-packages\dateparser\__init__.py in <module>()
      2 __version__ = '0.5.0'
      3 
----> 4 from .date import DateDataParser
      5 from .conf import apply_settings
      6 

\Anaconda2\lib\site-packages\dateparser\date.py in <module>()
      9 from dateutil.relativedelta import relativedelta
     10 
---> 11 from dateparser.date_parser import date_parser
     12 from dateparser.freshness_date_parser import freshness_date_parser
     13 from dateparser.languages.loader import LanguageDataLoader

\Anaconda2\lib\site-packages\dateparser\date_parser.py in <module>()
      8 from .timezone_parser import pop_tz_offset_from_string
      9 from .utils import strip_braces, apply_timezone, localize_timezone
---> 10 from .conf import apply_settings
     11 from .parser import parse
     12 

\Anaconda2\lib\site-packages\dateparser\conf.py in <module>()
      5 import six
      6 
----> 7 from ruamel.yaml import load as load_yaml
      8 
      9 from .utils import registry

ImportError: No module named ruamel.yaml
@asadurski asadurski self-assigned this Dec 12, 2016
@maebert
Copy link

maebert commented Dec 26, 2016

I have the same problem here, installing on OS X without anaconda.

@waqasshabbir
Copy link
Contributor

@brianckeegan @maebert can you run pip freeze and share the output. Also, please try installing ruamel yourself and see if the error still occurs.

P.S. pip install ruamel.yaml

@asadurski
Copy link
Member

I must say I can't reproduce the error (tried on fresh environment in Anaconda 2.7.13 on Windows 10). Dateparser and ruamel install and import fine for me. Waiting for input from @brianckeegan and @maebert.

@KyleBryant
Copy link

I am experiencing the same error, installing on OS X with Anaconda 4.2.13.

After

$ pip install dateparser
...
Successfully installed 
convertdate-2.1.0 
dateparser-0.5.1 
ephem-3.7.6.0 
jdatetime-1.8.1 
regex-2016.12.27 
ruamel.ordereddict-0.4.9 
ruamel.yaml-0.13.7 
typing-3.5.2.2 
tzlocal-1.3 
umalqurra-0.2

I received this error after trying to import dateparser

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-85-73864da8dec0> in <module>()
      1 from lxml import html
      2 import requests
----> 3 import dateparser

/Users/account/anaconda/lib/python2.7/site-packages/dateparser/__init__.py in <module>()
      2 __version__ = '0.5.1'
      3 
----> 4 from .date import DateDataParser
      5 from .conf import apply_settings
      6 

/Users/account/anaconda/lib/python2.7/site-packages/dateparser/date.py in <module>()
      9 from dateutil.relativedelta import relativedelta
     10 
---> 11 from dateparser.date_parser import date_parser
     12 from dateparser.freshness_date_parser import freshness_date_parser
     13 from dateparser.languages.loader import LanguageDataLoader

/Users/account/anaconda/lib/python2.7/site-packages/dateparser/date_parser.py in <module>()
      7 
      8 from .timezone_parser import pop_tz_offset_from_string
----> 9 from .utils import strip_braces, apply_timezone, localize_timezone
     10 from .conf import apply_settings
     11 from .parser import parse

/Users/account/anaconda/lib/python2.7/site-packages/dateparser/utils/__init__.py in <module>()
      6 
      7 import regex as re
----> 8 import ruamel.yaml as yaml
      9 from pytz import UTC, timezone, UnknownTimeZoneError
     10 

ImportError: No module named ruamel.yaml

trying $ pip install ruamel.yaml as @waqasshabbir suggested did not relieve the error

my output for pip freeze is the following:

$ pip freeze
alabaster==0.7.9
anaconda-client==1.6.0
anaconda-navigator==1.3.2
...
conda==4.2.13
conda-build==2.0.12
conda-verify==2.0.0
...
ruamel-yaml===-VERSION
ruamel.ordereddict==0.4.9
ruamel.yaml==0.13.7
...

Let me know if i should post the entire pip freeze output.

Thanks

@StarlitGhost
Copy link

Same issue on Ubuntu 16.04.1 LTS, Python 2.7.12

$ pip freeze
...
ruamel.ordereddict==0.4.9
ruamel.yaml==0.13.9
...

Let me know if you need anything else.

@waqasshabbir
Copy link
Contributor

@KyleBryant @matthewcox do you have libyaml installed?

@KyleBryant
Copy link

No, I cant find it in my pip freeze, so i guess not.

When I search on how to install it via pip however I only find stuff about installing pyyaml .

I there a good way to install it?

@waqasshabbir
Copy link
Contributor

@KyleBryant libyaml is a C library and will not show up in pip freeze. If you use homebrew with mac, you can install it by running brew install libyaml. Once with libyaml installed try reinstalling ruamel.yaml using pip.

@KyleBryant
Copy link

This works, thanks a lot!

@waqasshabbir
Copy link
Contributor

Closing the issue as is it is related to missing libyaml installation in the system which is required by ruamel.yaml to function properly.

Thanks all for your help!

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

No branches or pull requests

6 participants