红联Linux门户
Linux帮助

ubuntu系统安装pyquery

发布时间:2017-07-01 09:23:05来源:linux网站作者:sudsn
1.安装pyquery需要安装依赖库,所需要库参考
ubuntu系统安装pyquery
安装setuptool
https://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
解压并进入文件安装 文件路径ctrl+L 然后 cd 空格 +路径 就好了
sudo python setup.py install
另外下载好pyquery压缩包,先放着
https://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
 
2.安装附属的libxml2 、libxslt、lxml
sudo apt-get install libxslt-dev
sudo apt-get install libxml2-dev libxslt1-dev python-dev
sudo apt-get install zlib1g-dev
sudo apt-get install libevent-dev
如有问题执行
sudo apt-get update
再执行本部分
有些可能运行有问题,没关系1.百度2.查看需要的库安装好了就行,别的无所谓
 
3.确认安装好了libxml2 、libxslt、lxml
conda list
进入pyquery所在文件
sudo python setup.py install
结果如下:
Using /usr/local/lib/python2.7/dist-packages/cssselect-1.0.1-py2.7.egg
Finished processing dependencies for pyquery==1.2.17
并未结束
再退出文件
System-Product-Name:~$ pip install pyquery
Collecting pyquery
Downloading pyquery-1.2.17-py2.py3-none-any.whl
Collecting cssselect>0.7.9 (from pyquery)
Downloading cssselect-1.0.1-py2.py3-none-any.whl
Requirement already satisfied: lxml>=2.1 in ./anaconda2/lib/python2.7/site-packages (from pyquery)
Installing collected packages: cssselect, pyquery
Successfully installed cssselect-1.0.1 pyquery-1.2.17
pyqt 5.6.0 py27_2
pyquery 1.2.17 <pip>
pytables 3.3.0 np112py27_0
安装成功。
 
本文永久更新地址:http://www.linuxdiyf.com/linux/31809.html