Python Forum
Cannot pip install py-xml module
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cannot pip install py-xml module
#1
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?
Reply
#2
The xml package is in the standard library, you don't need to install anything.
Reply
#3
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!
Reply
#4
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Can't install nor import delorean module Tek 3 2,798 Oct-27-2021, 03:32 AM
Last Post: Tek
  Unable to install module rrowhe4d 1 2,279 Oct-13-2020, 10:20 AM
Last Post: Larz60+
  trying to pip install stasm module getting error djf123 3 4,495 Jul-26-2020, 05:00 AM
Last Post: millpond
  Install thresding module kalvarix 2 2,183 May-04-2020, 03:25 PM
Last Post: kalvarix
  Install module with pip3 on a non root user matthewpintor2107 1 2,398 Apr-28-2020, 03:16 PM
Last Post: pyzyx3qwerty
  How do I install the dom.minidom module? Johno 3 7,095 Apr-17-2020, 09:46 PM
Last Post: Larz60+
  Install module without "pip" hjk6734 2 10,992 Apr-09-2020, 09:09 AM
Last Post: buran
  how to import a module which is installed to personal folder using pip install --pre? geekgeek 2 2,417 Mar-09-2020, 02:38 PM
Last Post: geekgeek
  Can a module be executed even if the computer running it does not install it? CFYB 5 3,404 Feb-08-2020, 01:56 PM
Last Post: snippsat
  I get this when trying to install a module - SyntaxError: invalid syntax ? ejected 2 3,318 Mar-25-2019, 07:53 PM
Last Post: ejected

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020