相关疑难解决方法(0)

如何在Ubuntu上安装lxml

我在Ubuntu 11上使用easy_install安装lxml时遇到了困难.

当我输入时,$ easy_install lxml我得到:

Searching for lxml
Reading http://pypi.python.org/simple/lxml/
Reading http://codespeak.net/lxml
Best match: lxml 2.3
Downloading http://lxml.de/files/lxml-2.3.tgz
Processing lxml-2.3.tgz
Running lxml-2.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-7UdQOZ/lxml-2.3/egg-dist-tmp-GacQGy
Building lxml version 2.3.
Building without Cython.
ERROR: /bin/sh: xslt-config: not found

** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt 
In file included from src/lxml/lxml.etree.c:227:0:
src/lxml/etree_defs.h:9:31: fatal error: libxml/xmlversion.h: No such file or directory
compilation terminated.
Run Code Online (Sandbox Code Playgroud)

似乎libxsltlibxml2没有安装.我已尝试按照http://www.techsww.com/tutorials/libraries/libxslt/installation/installing_libxslt_on_ubuntu_linux.php …

python ubuntu lxml libxml2 easy-install

435
推荐指数
8
解决办法
27万
查看次数

ValueError:numpy.dtype的大小错误,请尝试重新编译

我刚刚在我的python 2.7上安装了pandas和statsmodels包当我尝试"导入pandas as pd"时,会出现此错误消息.有人可以帮忙吗?谢谢!!!

numpy.dtype has the wrong size, try recompiling
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\analytics\ext\python27\lib\site-packages\statsmodels-0.5.0-py2.7-win32.egg\statsmodels\formula\__init__.py",
line 4, in <module>
    from formulatools import handle_formula_data
  File "C:\analytics\ext\python27\lib\site-packages\statsmodels-0.5.0-py2.7-win32.egg\statsmodels\formula\formulatools.p
y", line 1, in <module>
    import statsmodels.tools.data as data_util
  File "C:\analytics\ext\python27\lib\site-packages\statsmodels-0.5.0-py2.7-win32.egg\statsmodels\tools\__init__.py", li
ne 1, in <module>
    from tools import add_constant, categorical
  File "C:\analytics\ext\python27\lib\site-packages\statsmodels-0.5.0-py2.7-win32.egg\statsmodels\tools\tools.py", line
14, in <module>
    from pandas import DataFrame
  File "C:\analytics\ext\python27\lib\site-packages\pandas\__init__.py", line 6, in <module>
    from . import hashtable, tslib, lib
  File "numpy.pxd", line …
Run Code Online (Sandbox Code Playgroud)

python install numpy pandas statsmodels

85
推荐指数
4
解决办法
8万
查看次数

标签 统计

python ×2

easy-install ×1

install ×1

libxml2 ×1

lxml ×1

numpy ×1

pandas ×1

statsmodels ×1

ubuntu ×1