Python_Scrapy:Installing lxml for Python and run an example
2012-11-05 09:36
459 查看
The goal of this guide is to install the lxml Python package and run
the example cssutils Python script that uses the lxml package. This guide was written while running Ubuntu, but can be applied to any Linux distribution. Open up the terminal and let’s get started.
?
?
?
?
?
the example cssutils Python script that uses the lxml package. This guide was written while running Ubuntu, but can be applied to any Linux distribution. Open up the terminal and let’s get started.
Step 1: Install easy_install For Python
The easy_install binary is a Python package manager that makes it easy to install cssutils. The following steps will get this installed:?
Step 2: Install Required Linux Packages for lxml
Now, we install the required Linux packages for installing lxml Python package.?
Step 3: Install the lxml and cssutils Python Packages
Next, install the lxml and cssutils Python packages using easy_install.?
Step 4: Prepare lxml Example
The following is a script copy/pasted from http://cssutils.googlecode.com/svn/trunk/examples/style.py. Copy paste this to your favorite text editor and save it. I named it lxml_test.py.?
Step 5: Run lxml Example
Finally, run the example program.?
Conclusions
I’m hoping this guide met the goal of teaching you how to install lxml and run an example Python script to demonstrate some capabilities of lxml and cssutils. Feedback is welcomed and appreciated.相关文章推荐
- Waf is a Python-based framework for configuring, compiling and installing applications
- example for document classify use nltk and python
- Python安装scrapy常见的坑Unable to find vcvarsall.bat 或Failed building wheel for lxml
- Install qibuild. Compile and run an example.
- Installing Selenium and PhantomJS for Python 3 on Ubuntu 14.04
- An Example for Javascript Function Scoping and Closure
- scipy-cluster - An extension to Scipy for generating, visualizing, and analyzing hierarchical clusters. - Google Project Hosting
- Scene is unreachable due to lack of entry points and does not have an identifier for runtime access
- IE8与Visual Studio“打架” (Error: An add-on for this website failed to run.)
- Python IDE and GUI Framework for Windows
- PIP安装Python的scipy,scrapy等包出现“failed building wheel for xxx”问题解决办法
- 数据结构之--series,DataFrame.use python and pandas for data mining
- The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
- The C Programming Language Example and Python Implemented
- This is an example of state transitions - for Transition System Semantics of DFL as a Scientific Workflow Language
- mac中安装python, pydev, beautifulsoup, lxml, scrapy
- Android FileObserver–The Underlying inotify Mechanism and an Example
- Scrapy: Run Using TOR and Multiple Agents Part 2
- Using Qt to build an Omi App for iOS (and Android)