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 | 维多斯,macOS和Linux |
| Dependencies | 没有 (纯 Python) |
从 PyPI 安装
运行下面的命令来安装最新版本:
asposefoss/tex is not yet published — build from source until it ships. See the project README for build instructions.为了确定特定版本:
asposefoss/tex is not yet published — build from source until it ships. See the project README for build instructions.验证安装
确认该包装正确安装:
import aspose_tex
print(aspose_tex.__version__)快速烟雾测试
from aspose_tex import TeXJob, TeXOptions, PdfDevice, StringInputSource
pdf = TeXJob(StringInputSource("Hello!"), PdfDevice(), options=TeXOptions()).run()
print("OK, PDF bytes:", len(pdf))