为了防止下面的过程出错,建议:

sudo apt-get install build-essential python-dev libxml2-dev libxslt1-dev

1.下载splinter 0.4.7.tar.gz包 http://pypi.python.org/pypi/splinter/0.4.7

2.解压 tar -zxvf 安装包  进入cd splinter 0.4.7

3.安装 sudo python setup.py install

    ImportError: No module named setuptools

   wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
 tar zxvf setuptools-0.6c11.tar.gz
   cd setuptools-0.6c11
   python setup.py build
   python setup.py install    

  安装过程中提示

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

  Using build configuration of libxslt 
  src/lxml/lxml.etree.c:4: fatal error: Python.h: 没有那个文件或目录
  compilation terminated.
  error: Setup script exited with error: command 'gcc' failed with exit status 1

  经过google查询得知没有安装libxml2-dev和libxlst1-dev

为保险起见,请依次安装如下:

  sudo apt-get install gcc

  sudo apt-get install python-dev

  sudo apt-get install libxml2 libxml2-dev

  sudo apt-get install libxslt1.1 libxslt1-dev

  后面的是数字1,不是字母l,不要写错了。

AttributeError: 'NoneType' object has no attribute 'clone' 到 http://pypi.python.org/pypi/setuptools/  下载ez_setup.py 

执行 python ez_setup.py -U setuptools 升级setuptools   过程中可能会出现网络的错误,如connection peer ,可以重复执行一下

支持浏览器fixfox,chrome 还需下载安装http://pypi.python.org/pypi/selenium 下载selenium-2.25.0.tar.gz

解压 tar -zxvf selenium-2.25.0.tar.gz 

 cd selenium-2.25.0

sudo python setup.py install

才能模拟浏览器的操作

相关文章:

  • 2022-12-23
  • 2022-01-30
  • 2021-09-24
  • 2022-01-19
  • 2021-05-16
  • 2021-06-04
  • 2022-03-05
猜你喜欢
  • 2022-01-09
  • 2022-01-20
  • 2021-11-24
  • 2021-10-23
  • 2022-02-25
  • 2021-11-14
  • 2022-12-23
相关资源
相似解决方案