Installation
Installation
Aspose.TeX FOSS for Python is distributed as a pure Python package on PyPI. It has no native extensions, no LaTeX installation requirement, and no Perl runtime dependency. Install it using the pip package manager on Windows, macOS, or Linux. The package works with Python 3.10 and later and is compatible with virtual environments and container-based deployments.
Prerequisites
| Requirement | Detail |
|---|---|
| Python | 3.10 or later |
| OS | Windows, MacOS và Linux |
| Dependencies | Không có (Pure Python) |
Cài đặt từ Pypi
Thực hiện lệnh sau để cài đặt phiên bản mới nhất:
pip install aspose-tex>=26.5Để pin một phiên bản cụ thể:
pip install aspose-tex==26.5Kiểm tra cài đặt
Kiểm tra gói được cài đặt đúng cách:
import aspose_tex
print(aspose_tex.__version__)Kiểm tra thuốc lá nhanh
from aspose_tex import TeXJob, TeXOptions, PdfDevice, StringInputSource
pdf = TeXJob(StringInputSource("Hello!"), PdfDevice(), options=TeXOptions()).run()
print("OK, PDF bytes:", len(pdf))