Python Forum

Full Version: Cannot pip install py-xml module
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to use scripts I wrote earlier in a new virtualenv. In one of the scripts I import

import xml.etree.ElementTree as ET
So I need to import this xml module. I think this was this py-xml module I installed earlier, but when I try to pip install it in the venv, I get this error:


Output:
(venv) user:~/catkin_ws$ pip install py-xml Collecting py-xml Using cached https://files.pythonhosted.org/packages/90/02/4a3cf06d254c70334ebf028e0bcd595c6f265ce1f1ed752bf2957dd8ba08/py-xml-1.0.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-XHVo1p/py-xml/setup.py", line 9, in <module> with open('README.md', 'r', 'utf-8') as fp: TypeError: an integer is required ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-XHVo1p/py-xml/
And I have updated the setuptools and tried it with venv with python3 and python2. Both have the same result. How can I fix this?
The xml package is in the standard library, you don't need to install anything.
I have updated the py-xml library in my fork at https://github.com/JeremyDemers/py-xml. Download and unzip the package. From the terminal go to the py-xml folder, type python setup.py install. Done!
Use BeautifulSoup - lxml the are better and more updated.
Web-Scraping part-1 has the basic,it's not much different at all for xml.