hit counter

Timeline

My development logbook

Pandas - dateutil.parser Import Error

Try to run import pandas in python. Encountered this:

1
2
3
4
5
6
7
8
>>> import pandas
No module named dateutil.parser
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.12.0-py2.7-macosx-10.9-x86_64.egg/pandas/__init__.py", line 6, in <module>
    from . import hashtable, tslib, lib
  File "tslib.pyx", line 31, in init pandas.tslib (pandas/tslib.c:48782)
ImportError: No module named dateutil.parser

Fixed by running

1
$ pip install python-dateutil

Category vs Class Extension

Category does not allow addition of ivar.

The restriction does not apply to class extension.

That’s why I can do something like this:

1
2
3
4
5
@interface SOViewController ()
@property (weak, nonatomic) IBOutlet UIPickerView *Picker1;
@property (weak, nonatomic) IBOutlet UIPickerView *Picker2;

@end

User Defined Runtime Attribute

It comes from the interface builder. The exception is thrown when xib file is loaded and trying to set an attribute in a class.

If the attribute is not defined, you will get this error and the app will crash

this class is not key value coding-compliant for the key <KEYNAME>.'

Conda Install Ipython Problem

How can I update pip? Need research…

1
2
3
4
5
6
7
8
9
10
11
12
13
14
$ conda update ipython
# All packages already at latest version, nothing to do.
# packages in environment at /Users/antkong/anaconda:
#
# Warning: Your version of pip is older than what conda requires for pip
# integration, so pip-installed packages will not be displayed.  Please
# update pip, (conda update pip -p /Users/antkong/anaconda)

conda                     2.2.5                    py27_0  
ipython                   1.1.0                    py27_0  
$ which pip
/Users/antkong/anaconda/bin/pip
$ pip --version
pip 1.4.1 from /Users/antkong/anaconda/lib/python2.7/site-packages (python 2.7)