I cannot find in my OSX babel installation to import the cldr babel files, what am I doing wrong?

I have been trying to use babel on my iMac (OSX Mavericks, I installed python and babel using MacPorts) but I get this error message :

writing PO template file to ./locale/messages.pot
Traceback (most recent call last):
  File "/usr/local/bin/pybabel", line 8, in <module>
    load_entry_point('Babel==2.0-dev-20131218', 'console_scripts', 'pybabel')()
  File "/Library/Python/2.7/site-packages/Babel-2.0_dev_20131218-py2.7.egg/babel/messages/", line 1151, in main
    return CommandLineInterface().run(sys.argv)
  File "/Library/Python/2.7/site-packages/Babel-2.0_dev_20131218-py2.7.egg/babel/messages/", line 665, in run
    return getattr(self, cmdname)(args[1:])
  File "/Library/Python/2.7/site-packages/Babel-2.0_dev_20131218-py2.7.egg/babel/messages/", line 947, in extract
  File "/Library/Python/2.7/site-packages/Babel-2.0_dev_20131218-py2.7.egg/babel/messages/", line 427, in write_po
    messages = list(catalog)
  File "/Library/Python/2.7/site-packages/Babel-2.0_dev_20131218-py2.7.egg/babel/messages/", line 552, in __iter__
    for name, value in self.mime_headers:
  File "/Library/Python/2.7/site-packages/Babel-2.0_dev_20131218-py2.7.egg/babel/messages/", line 337, in _get_mime_headers
  File "/Library/Python/2.7/site-packages/Babel-2.0_dev_20131218-py2.7.egg/babel/", line 609, in format_datetime
    locale = Locale.parse(locale)
  File "/Library/Python/2.7/site-packages/Babel-2.0_dev_20131218-py2.7.egg/babel/", line 284, in parse
    language = get_global('language_aliases').get(language, language)
  File "/Library/Python/2.7/site-packages/Babel-2.0_dev_20131218-py2.7.egg/babel/", line 53, in get_global
  File "/Library/Python/2.7/site-packages/Babel-2.0_dev_20131218-py2.7.egg/babel/", line 25, in _raise_no_data_error
  raise RuntimeError('The babel data files are not available. '
RuntimeError: The babel data files are not available. This usually happens because you are using a source checkout from Babel and you did not build the data files.  Just make sure to run "python import_cldr" before installing the library.

I can't run the following command because I cannot find the file in the .egg archive on my Mac

>python import_cldr

Trying to run the on another version of babel I downloaded resulted in this error, but even if I could do it it would not solve my problem I think :

> python import_cldr
running import_cldr
Local copy '/Users/Ailete/Downloads/Babel-1.3/cldr/' not found
Downloading ''
Traceback (most recent call last):
  File "scripts/", line 104, in <module>
  File "scripts/", line 82, in main
    urlretrieve(URL, zip_path, reporthook)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/",     line 94, in urlretrieve
    return _urlopener.retrieve(url, filename, reporthook, data)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 244, in retrieve
    tfp = open(filename, 'wb')
IOError: [Errno 2] No such file or directory: '/Users/Ailete/Downloads/Babel-1.3/cldr/'

Any idea about how to install the CLDR file for the .egg installation ?

Here is the content of the babel package on my machine :

> cd /Library/Python/2.7/site-packages/Babel-2.0_dev_20131218-py2.7.egg/
> ls
EGG-INFO    babel
> cd babel
> ls
__init__.pyc    core.pyc    localedata.pyc  numbers.pyc support.pyc    localtime
_compat.pyc     dates.pyc   messages        plural.pyc  util.pyc

And the results of some commands I tried :

> cd /Library/Python/2.7/site-packages/Babel-2.0_dev_20131218-py2.7.egg/babel
> python import_cldr
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/ can't open file '': [Errno 2] No such file or directory
> python install
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/ can't open file '': [Errno 2] No such file or directory


  • I think I was looking at a version of babel installed with the system ...

    I found out that MacPorts install things in :


    The cldr files I need seem to be located in :


    I now need to find how to set the paths properly on Mavericks ... But my problem seem to be that of the system not using the proper version of Babel.

    Thank you for your answers, I will make a new question to help me with the path configuration.