Python 在ubuntu 12.04中编译statsmodels示例

Python 在ubuntu 12.04中编译statsmodels示例,python,bash,ubuntu,statsmodels,Python,Bash,Ubuntu,Statsmodels,我是python新手,在阅读了运行一些示例之后,我想尝试statsmodels 我从statsmodels网站复制了以下示例 #!/usr/bin/env python3 import numpy as np import statsmodels.api as sm spector_data = sm.datasets.spector.load() spector_data.exog = sm.add_constant(spector_data.exog, prepend=False) #Fi

我是python新手,在阅读了运行一些示例之后,我想尝试statsmodels

我从statsmodels网站复制了以下示例

#!/usr/bin/env python3
import numpy as np
import statsmodels.api as sm
spector_data = sm.datasets.spector.load()
spector_data.exog = sm.add_constant(spector_data.exog, prepend=False)

#Fit and summarize OLS model
mod = sm.OLS(spector_data.endog, spector_data.exog)
res = mod.fit()
print (res.summary())
我得到以下错误: 为scipy运行单元测试

Traceback (most recent call last):
  File "./statsmodels.py", line 3, in <module>
    import statsmodels.api as sm
  File "/home/ra/python/statsmodels.py", line 3, in <module>
    scipy.test()
  File "/usr/lib/python3/dist-packages/numpy/testing/nosetester.py", line 318, in test
    self._show_system_info()
  File "/usr/lib/python3/dist-packages/numpy/testing/nosetester.py", line 187, in _show_system_info
    nose = import_nose()
  File "/usr/lib/python3/dist-packages/numpy/testing/nosetester.py", line 69, in import_nose
    raise ImportError(msg)
ImportError: Need nose >= 0.10.0 for tests - see http://somethingaboutorange.com/mrl/projects/nose
这次我的错误在哪里

顺便说一句,这是我在python提示符下看到的熊猫版本:

>>> import pandas
/usr/local/lib/python2.7/dist-packages/pandas/io/excel.py:626: UserWarning: Installed openpyxl is not supported at this time. Use >=1.6.1 and <2.0.0.
  .format(openpyxl_compat.start_ver, openpyxl_compat.stop_ver))
>>> pandas.__version__
'0.14.0'
为了解决openpyxl问题,我做了以下工作:

pip uninstall openpyxl
Cannot uninstall requirement openpyxl, not installed
Storing debug log for failure in /tmp/tmpci3yro
ra@ra-VGN-FZ19:~$ pip install openpyxl==1.8.6
Downloading/unpacking openpyxl==1.8.6
  Downloading openpyxl-1.8.6-py2.py3-none-any.whl (190kB): 190kB downloaded
Installing collected packages: openpyxl
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/pip-1.5.6-py3.2.egg/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/local/lib/python3.2/dist-packages/pip-1.5.6-py3.2.egg/pip/commands/install.py", line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/usr/local/lib/python3.2/dist-packages/pip-1.5.6-py3.2.egg/pip/req.py", line 1435, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/usr/local/lib/python3.2/dist-packages/pip-1.5.6-py3.2.egg/pip/req.py", line 671, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/usr/local/lib/python3.2/dist-packages/pip-1.5.6-py3.2.egg/pip/req.py", line 901, in move_wheel_files
    pycompile=self.pycompile,
  File "/usr/local/lib/python3.2/dist-packages/pip-1.5.6-py3.2.egg/pip/wheel.py", line 215, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/usr/local/lib/python3.2/dist-packages/pip-1.5.6-py3.2.egg/pip/wheel.py", line 205, in clobber
    os.makedirs(destdir)
  File "/usr/lib/python3.2/os.py", line 152, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python3.2/dist-packages/openpyxl-1.8.6.dist-info'

Storing debug log for failure in /tmp/tmp15h3o4
这是python3的错误:

sudo easy_install3 -U statsmodels
Searching for statsmodels
Reading http://pypi.python.org/simple/statsmodels/
Reading http://statsmodels.sourceforge.net/
Reading https://github.com/statsmodels/statsmodels/downloads
Best match: statsmodels 0.5.0
Downloading https://pypi.python.org/packages/source/s/statsmodels/statsmodels-0.5.0.zip#md5=4ed78e8c6ababdcae0400fc0fe6f31a7
Processing statsmodels-0.5.0.zip
Running statsmodels-0.5.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-oudla7/statsmodels-0.5.0/egg-dist-tmp-o6dh5a
Traceback (most recent call last):
  File "setup.py", line 120, in check_dependency_versions
ImportError: No module named patsy

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/easy_install3", line 9, in <module>
    load_entry_point('distribute==0.6.24dev-r0', 'console_scripts', 'easy_install')()
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1931, in main
    with_ei_usage(lambda:
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1912, in with_ei_usage
    return f()
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1935, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "/usr/lib/python3.2/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.2/distutils/dist.py", line 917, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.2/distutils/dist.py", line 936, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 368, in run
    self.easy_install(spec, not self.no_deps)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 608, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 638, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 828, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1105, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1094, in run_setup
    run_setup(setup_script, args)
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 31, in run_setup
    lambda: exec(compile(open(
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 73, in run
    return func()
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 34, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'})
  File "setup.py", line 463, in <module>
  File "setup.py", line 122, in check_dependency_versions
ImportError: statsmodels requires patsy. http://patsy.readthedocs.org
ra@ra-VGN-FZ19:~$ sudo easy_install3 -U patsy
Searching for patsy
Reading http://pypi.python.org/simple/patsy/
Best match: patsy 0.2.1
Downloading https://pypi.python.org/packages/source/p/patsy/patsy-0.2.1.zip#md5=d51fa2fcb60018d75073f375c87ddccf
Processing patsy-0.2.1.zip
Running patsy-0.2.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-l1wpxc/patsy-0.2.1/egg-dist-tmp-2qgd7e
no previously-included directories found matching 'doc/_build'
zip_safe flag not set; analyzing archive contents...
Adding patsy 0.2.1 to easy-install.pth file

Installed /usr/local/lib/python3.2/dist-packages/patsy-0.2.1-py3.2.egg
Processing dependencies for patsy
Finished processing dependencies for patsy
sudo easy\U install3-U stats型号
搜索statsmodels
阅读http://pypi.python.org/simple/statsmodels/
阅读http://statsmodels.sourceforge.net/
阅读https://github.com/statsmodels/statsmodels/downloads
最佳匹配:statsmodels 0.5.0
正在下载https://pypi.python.org/packages/source/s/statsmodels/statsmodels-0.5.0.zip#md5=4ed78e8c6ababdcae0400fc0fe6f31a7
处理statsmodels-0.5.0.zip
运行statsmodels-0.5.0/setup.py-q bdist_egg--dist dir/tmp/easy_install-oudla7/statsmodels-0.5.0/egg-dist-tmp-o6dh5a
回溯(最近一次呼叫最后一次):
文件“setup.py”,第120行,在check\u dependency\u版本中
ImportError:没有名为patsy的模块
在处理上述异常期间,发生了另一个异常:
回溯(最近一次呼叫最后一次):
文件“/usr/bin/easy_install3”,第9行,在
加载入口点('distribute==0.6.24dev-r0','console\u scripts','easy\u install')()
文件“/usr/lib/python3/dist packages/setuptools/command/easy_install.py”,第1931行,在main中
使用_ei_(λ:
文件“/usr/lib/python3/dist-packages/setuptools/command/easy\u-install.py”,第1912行,使用
返回f()
文件“/usr/lib/python3/dist packages/setuptools/command/easy_install.py”,第1935行,在
distclass=DistributionWithout帮助命令,**kw
文件“/usr/lib/python3.2/distutils/core.py”,第148行,在安装程序中
dist.run_命令()
文件“/usr/lib/python3.2/distutils/dist.py”,第917行,在run_命令中
self.run_命令(cmd)
文件“/usr/lib/python3.2/distutils/dist.py”,第936行,在run_命令中
cmd_obj.run()
文件“/usr/lib/python3/dist packages/setuptools/command/easy_install.py”,第368行,正在运行
自我。易于安装(规范,非自我。无需安装)
文件“/usr/lib/python3/dist-packages/setuptools/command/easy\u-install.py”,第608行,在easy\u-install中
返回自安装项目(规格、距离位置、tmpdir、deps)
文件“/usr/lib/python3/dist-packages/setuptools/command/easy\u install.py”,第638行,在安装项中
dists=self.install_-eggs(规范、下载、tmpdir)
文件“/usr/lib/python3/dist packages/setuptools/command/easy_install.py”,第828行,在install_中
返回self.build\u和安装(安装程序脚本、安装程序库)
文件“/usr/lib/python3/dist-packages/setuptools/command/easy\u-install.py”,第1105行,内置和安装
self.run\u安装程序(安装程序脚本、安装程序库、参数)
文件“/usr/lib/python3/dist packages/setuptools/command/easy\u install.py”,第1094行,在run\u安装程序中
运行安装程序(安装程序脚本,args)
文件“/usr/lib/python3/dist packages/setuptools/sandbox.py”,第31行,在运行设置中
lambda:exec(编译)(打开(
文件“/usr/lib/python3/dist-packages/setuptools/sandbox.py”,第73行,正在运行
返回func()
文件“/usr/lib/python3/dist-packages/setuptools/sandbox.py”,第34行,在
{文件:安装脚本,'.'名称'.'':'.'主'.'})
文件“setup.py”,第463行,在
文件“setup.py”,第122行,在check\u dependency\u版本中
重要提示:statsmodels需要patsy。http://patsy.readthedocs.org
ra@ra-VGN-FZ19:~$sudo easy_install3-U patsy
寻找帕西
阅读http://pypi.python.org/simple/patsy/
最佳匹配:patsy 0.2.1
正在下载https://pypi.python.org/packages/source/p/patsy/patsy-0.2.1.zip#md5=d51fa2fcb60018d75073f375c87ddccf
处理patsy-0.2.1.zip
运行patsy-0.2.1/setup.py-q bdist_egg--dist dir/tmp/easy_install-l1wpxc/patsy-0.2.1/egg-dist-tmp-2qgd7e
未找到与“doc/\u build”匹配的以前包含的目录
未设置zip_安全标志;正在分析存档内容。。。
将patsy 0.2.1添加到easy-install.pth文件
已安装/usr/local/lib/python3.2/dist-packages/patsy-0.2.1-py3.2.egg
处理patsy的依赖项
已完成处理patsy的依赖项
感谢Jonathan Villemaire Krajden在我寻找matplotlib中show()的解决方案时误导了我,我的statsmodels已经崩溃了。 我尝试重新安装statsmodels,现在出现以下错误:

easy_install3 -U statsmodels
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 449, in _build_master
    ws.require(__requires__)
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 742, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 643, in resolve
    raise VersionConflict(dist, req) # XXX put more info here
pkg_resources.VersionConflict: (distribute 0.7.3 (/usr/local/lib/python3.2/dist-packages/distribute-0.7.3-py3.2.egg), Requirement.parse('distribute==0.6.24dev-r0'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/easy_install3", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 2837, in <module>
    working_set = WorkingSet._build_master()
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 451, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 464, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 799, in __init__
    self.scan(search_path)
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 829, in scan
    self.add(dist)
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 849, in add
    dists.sort(key=operator.attrgetter('hashcmp'), reverse=True)
TypeError: unorderable types: NoneType() < str()
ra@ra-VGN-FZ19:~$ sudo easy_install3 -U statsmodels
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 449, in _build_master
    ws.require(__requires__)
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 742, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 643, in resolve
    raise VersionConflict(dist, req) # XXX put more info here
pkg_resources.VersionConflict: (distribute 0.7.3 (/usr/local/lib/python3.2/dist-packages/distribute-0.7.3-py3.2.egg), Requirement.parse('distribute==0.6.24dev-r0'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/easy_install3", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 2837, in <module>
    working_set = WorkingSet._build_master()
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 451, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 464, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 799, in __init__
    self.scan(search_path)
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 829, in scan
    self.add(dist)
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 849, in add
    dists.sort(key=operator.attrgetter('hashcmp'), reverse=True)
TypeError: unorderable types: NoneType() < str()

sudo pip3 install statsmodels
Downloading/unpacking statsmodels
  Downloading statsmodels-0.5.0.tar.gz (5.5MB): 5.5MB downloaded
  Running setup.py (path:/tmp/pip_build_root/statsmodels/setup.py) egg_info for package statsmodels
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip_build_root/statsmodels/setup.py", line 463, in <module>
        check_dependency_versions(min_versions)
      File "/tmp/pip_build_root/statsmodels/setup.py", line 109, in check_dependency_versions
        from scipy.version import short_version as spversion
      File "/usr/lib/python3/dist-packages/scipy/__init__.py", line 124, in <module>
        pkgload(verbose=SCIPY_IMPORT_VERBOSE,postpone=True)
      File "/usr/local/lib/python3.2/dist-packages/numpy/_import_tools.py", line 177, in __call__
        for package_name in self._get_sorted_names():
      File "/usr/local/lib/python3.2/dist-packages/numpy/_import_tools.py", line 114, in _get_sorted_names
        for name in depend_dict.keys():
    RuntimeError: dictionary changed size during iteration
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip_build_root/statsmodels/setup.py", line 463, in <module>

    check_dependency_versions(min_versions)

  File "/tmp/pip_build_root/statsmodels/setup.py", line 109, in check_dependency_versions

    from scipy.version import short_version as spversion

  File "/usr/lib/python3/dist-packages/scipy/__init__.py", line 124, in <module>

    pkgload(verbose=SCIPY_IMPORT_VERBOSE,postpone=True)

  File "/usr/local/lib/python3.2/dist-packages/numpy/_import_tools.py", line 177, in __call__

    for package_name in self._get_sorted_names():

  File "/usr/local/lib/python3.2/dist-packages/numpy/_import_tools.py", line 114, in _get_sorted_names

    for name in depend_dict.keys():

RuntimeError: dictionary changed size during iteration

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/statsmodels
Storing debug log for failure in /home/ra/.pip/pip.log
easy\U install3-U stats型号
回溯(最近一次呼叫最后一次):
文件“/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py”,第449行,位于主版本中
ws.require(\uuuu requires\uuuuu)
文件“/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py”,第742行,要求
需要=自我解析(解析需求(需求))
文件“/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py”,第643行,解析中
提升版本冲突(地区,需求)#XXX在此处输入更多信息
pkg_resources.VersionConflict:(distribute 0.7.3(/usr/local/lib/python3.2/dist-packages/distribute-0.7.3-py3.2.egg),Requirement.parse('distribute==0.6.24dev-r0'))
在处理上述异常期间,发生了另一个异常:
回溯(最近一次呼叫最后一次):
文件“/usr/bin/easy_install3”,第5行,在
从打包资源导入加载入口点
文件“/usr/local/lib/python3.2/dist packages/setuptools-5.1-py3.2.egg/pkg_resources.py”,第2837行,中
工作集=工作集。_build_master()
文件“/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py”,第451行,位于主版本中
从需求返回cls.\u构建需求(\u需要\u)
文件“/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py”,第464行,根据需求生成
dists=ws.resolve(请求,环境())
文件“/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py”,第799行,在__
self.scan(搜索路径)
文件“/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/p
pip uninstall openpyxl
Cannot uninstall requirement openpyxl, not installed
Storing debug log for failure in /tmp/tmpci3yro
ra@ra-VGN-FZ19:~$ pip install openpyxl==1.8.6
Downloading/unpacking openpyxl==1.8.6
  Downloading openpyxl-1.8.6-py2.py3-none-any.whl (190kB): 190kB downloaded
Installing collected packages: openpyxl
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/pip-1.5.6-py3.2.egg/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/local/lib/python3.2/dist-packages/pip-1.5.6-py3.2.egg/pip/commands/install.py", line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/usr/local/lib/python3.2/dist-packages/pip-1.5.6-py3.2.egg/pip/req.py", line 1435, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/usr/local/lib/python3.2/dist-packages/pip-1.5.6-py3.2.egg/pip/req.py", line 671, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/usr/local/lib/python3.2/dist-packages/pip-1.5.6-py3.2.egg/pip/req.py", line 901, in move_wheel_files
    pycompile=self.pycompile,
  File "/usr/local/lib/python3.2/dist-packages/pip-1.5.6-py3.2.egg/pip/wheel.py", line 215, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/usr/local/lib/python3.2/dist-packages/pip-1.5.6-py3.2.egg/pip/wheel.py", line 205, in clobber
    os.makedirs(destdir)
  File "/usr/lib/python3.2/os.py", line 152, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python3.2/dist-packages/openpyxl-1.8.6.dist-info'

Storing debug log for failure in /tmp/tmp15h3o4
sudo easy_install3 -U statsmodels
Searching for statsmodels
Reading http://pypi.python.org/simple/statsmodels/
Reading http://statsmodels.sourceforge.net/
Reading https://github.com/statsmodels/statsmodels/downloads
Best match: statsmodels 0.5.0
Downloading https://pypi.python.org/packages/source/s/statsmodels/statsmodels-0.5.0.zip#md5=4ed78e8c6ababdcae0400fc0fe6f31a7
Processing statsmodels-0.5.0.zip
Running statsmodels-0.5.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-oudla7/statsmodels-0.5.0/egg-dist-tmp-o6dh5a
Traceback (most recent call last):
  File "setup.py", line 120, in check_dependency_versions
ImportError: No module named patsy

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/easy_install3", line 9, in <module>
    load_entry_point('distribute==0.6.24dev-r0', 'console_scripts', 'easy_install')()
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1931, in main
    with_ei_usage(lambda:
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1912, in with_ei_usage
    return f()
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1935, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "/usr/lib/python3.2/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.2/distutils/dist.py", line 917, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.2/distutils/dist.py", line 936, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 368, in run
    self.easy_install(spec, not self.no_deps)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 608, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 638, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 828, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1105, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1094, in run_setup
    run_setup(setup_script, args)
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 31, in run_setup
    lambda: exec(compile(open(
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 73, in run
    return func()
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 34, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'})
  File "setup.py", line 463, in <module>
  File "setup.py", line 122, in check_dependency_versions
ImportError: statsmodels requires patsy. http://patsy.readthedocs.org
ra@ra-VGN-FZ19:~$ sudo easy_install3 -U patsy
Searching for patsy
Reading http://pypi.python.org/simple/patsy/
Best match: patsy 0.2.1
Downloading https://pypi.python.org/packages/source/p/patsy/patsy-0.2.1.zip#md5=d51fa2fcb60018d75073f375c87ddccf
Processing patsy-0.2.1.zip
Running patsy-0.2.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-l1wpxc/patsy-0.2.1/egg-dist-tmp-2qgd7e
no previously-included directories found matching 'doc/_build'
zip_safe flag not set; analyzing archive contents...
Adding patsy 0.2.1 to easy-install.pth file

Installed /usr/local/lib/python3.2/dist-packages/patsy-0.2.1-py3.2.egg
Processing dependencies for patsy
Finished processing dependencies for patsy
easy_install3 -U statsmodels
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 449, in _build_master
    ws.require(__requires__)
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 742, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 643, in resolve
    raise VersionConflict(dist, req) # XXX put more info here
pkg_resources.VersionConflict: (distribute 0.7.3 (/usr/local/lib/python3.2/dist-packages/distribute-0.7.3-py3.2.egg), Requirement.parse('distribute==0.6.24dev-r0'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/easy_install3", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 2837, in <module>
    working_set = WorkingSet._build_master()
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 451, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 464, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 799, in __init__
    self.scan(search_path)
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 829, in scan
    self.add(dist)
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 849, in add
    dists.sort(key=operator.attrgetter('hashcmp'), reverse=True)
TypeError: unorderable types: NoneType() < str()
ra@ra-VGN-FZ19:~$ sudo easy_install3 -U statsmodels
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 449, in _build_master
    ws.require(__requires__)
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 742, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 643, in resolve
    raise VersionConflict(dist, req) # XXX put more info here
pkg_resources.VersionConflict: (distribute 0.7.3 (/usr/local/lib/python3.2/dist-packages/distribute-0.7.3-py3.2.egg), Requirement.parse('distribute==0.6.24dev-r0'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/easy_install3", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 2837, in <module>
    working_set = WorkingSet._build_master()
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 451, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 464, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 799, in __init__
    self.scan(search_path)
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 829, in scan
    self.add(dist)
  File "/usr/local/lib/python3.2/dist-packages/setuptools-5.1-py3.2.egg/pkg_resources.py", line 849, in add
    dists.sort(key=operator.attrgetter('hashcmp'), reverse=True)
TypeError: unorderable types: NoneType() < str()

sudo pip3 install statsmodels
Downloading/unpacking statsmodels
  Downloading statsmodels-0.5.0.tar.gz (5.5MB): 5.5MB downloaded
  Running setup.py (path:/tmp/pip_build_root/statsmodels/setup.py) egg_info for package statsmodels
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip_build_root/statsmodels/setup.py", line 463, in <module>
        check_dependency_versions(min_versions)
      File "/tmp/pip_build_root/statsmodels/setup.py", line 109, in check_dependency_versions
        from scipy.version import short_version as spversion
      File "/usr/lib/python3/dist-packages/scipy/__init__.py", line 124, in <module>
        pkgload(verbose=SCIPY_IMPORT_VERBOSE,postpone=True)
      File "/usr/local/lib/python3.2/dist-packages/numpy/_import_tools.py", line 177, in __call__
        for package_name in self._get_sorted_names():
      File "/usr/local/lib/python3.2/dist-packages/numpy/_import_tools.py", line 114, in _get_sorted_names
        for name in depend_dict.keys():
    RuntimeError: dictionary changed size during iteration
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip_build_root/statsmodels/setup.py", line 463, in <module>

    check_dependency_versions(min_versions)

  File "/tmp/pip_build_root/statsmodels/setup.py", line 109, in check_dependency_versions

    from scipy.version import short_version as spversion

  File "/usr/lib/python3/dist-packages/scipy/__init__.py", line 124, in <module>

    pkgload(verbose=SCIPY_IMPORT_VERBOSE,postpone=True)

  File "/usr/local/lib/python3.2/dist-packages/numpy/_import_tools.py", line 177, in __call__

    for package_name in self._get_sorted_names():

  File "/usr/local/lib/python3.2/dist-packages/numpy/_import_tools.py", line 114, in _get_sorted_names

    for name in depend_dict.keys():

RuntimeError: dictionary changed size during iteration

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/statsmodels
Storing debug log for failure in /home/ra/.pip/pip.log
sudo pip3 install nose
#!/usr/bin/env python