Skip to main content

System Requirements

bormeparser requires Python 3.6 or higher. The library has been tested on Python 3.6, 3.7, and 3.8.

System Dependencies

Before installing bormeparser, you need to install some system-level dependencies. The lxml package used by bormeparser requires compilation and needs development headers.

Ubuntu/Debian

sudo apt-get install python3-dev libxslt1-dev libffi-dev zlib1g-dev gcc

Fedora/CentOS/RHEL

sudo yum install python3-devel libxslt-devel libffi-devel zlib-devel gcc

macOS

On macOS, you’ll need Xcode Command Line Tools:
xcode-select --install
These dependencies are required because the lxml library needs to compile C extensions for XML parsing performance.

Installation Methods

pip install bormeparser

Installing from Source

If you want to install the latest development version or contribute to the project, you can install from source:
1

Install system dependencies

First, install the required system packages:
sudo apt-get install python3-dev libxslt1-dev libffi-dev zlib1g-dev gcc
2

Clone the repository

Clone the bormeparser repository from GitHub:
git clone https://github.com/PabloCastellano/bormeparser.git
cd bormeparser
3

Install the package

Install bormeparser in development mode:
python setup.py install
Or for development:
pip install -e .

Dependencies

bormeparser automatically installs the following Python dependencies:
  • lxml (4.9.1) - XML and HTML parsing
  • pdfminer.six (20220524) - PDF text extraction
  • PyPDF2 (2.11.0) - PDF file manipulation
  • requests (>=2.22.0, <3.0.0) - HTTP library for downloading BORME files
  • wheel (0.38.1) - Package building

Verifying the Installation

To verify that bormeparser is installed correctly, open a Python interactive shell and try importing the library:
import bormeparser
print(bormeparser.__file__)
You should see the path to the installed bormeparser package without any errors.
import bormeparser
from bormeparser import parse, SECCION, PROVINCIA

# Check available modules
print("bormeparser imported successfully!")
print(f"Available sections: {SECCION.A}, {SECCION.B}, {SECCION.C}")

Running Tests

If you’ve installed from source, you can run the test suite to ensure everything works correctly:
python setup.py test

Troubleshooting

lxml Installation Fails

If you encounter errors installing lxml, make sure you have installed all system dependencies:
sudo apt-get install python3-dev libxslt1-dev libffi-dev zlib1g-dev gcc

Permission Denied

If you get permission errors during installation, either:
  1. Use a virtual environment (recommended)
  2. Install with --user flag: pip install --user bormeparser
  3. Use sudo (not recommended): sudo pip install bormeparser
Using sudo with pip can cause conflicts with your system’s package manager. Always prefer virtual environments.

Python Version Issues

bormeparser requires Python 3.6 or higher. Check your Python version:
python --version
# or
python3 --version
If you have multiple Python versions, use pip3 instead of pip to ensure you’re installing for Python 3.

Next Steps

Now that you have bormeparser installed, head over to the Quickstart guide to learn how to use it!

Build docs developers (and LLMs) love