---
Product: Aspose.Slides
Platform: python
Page Type: kb
Canonical URL: https://kb.aspose.org/slides/python/how-to-get-started-slides-python
Last Updated: 2026-04-04
---

# How to Get Started with Aspose.Slides FOSS for Python

Learn how to install aspose-slides-foss, create a presentation, add shapes and text, apply fills, and save to PPTX using Presentation, SaveFormat, and ShapeType.

`aspose-slides-foss` for Python is a free, MIT-licensed library for creating and editing
PowerPoint `.pptx` files — no Microsoft Office required, pure Python from PyPI.

## Step-by-Step Guide

### Step 1: Install the Package

Install from PyPI with pip:

```bash
pip install aspose-slides-foss
```

Verify the install loaded correctly:

```python
from aspose.slides_foss import Presentation
print("aspose-slides-foss is ready.")
```

---

### Step 2: Import Required Classes

Import the modules you need for loading presentations and saving:

```python
from aspose.slides_foss import Presentation, SaveFormat, ShapeType, FillType
```

---

### Step 3: Create a Presentation

Construct a `Presentation` with no arguments to start with one blank slide:

```python
from aspose.slides_foss import Presentation, SaveFormat

prs = Presentation()
slide = prs.slides[0]
print(f"Slides: {len(prs.slides)}")
prs.save("new_presentation.pptx", SaveFormat.PPTX)
```

---

### Step 4: Add a Shape with Text

Use `slide.shapes.add_auto_shape()` to insert a rectangle, then call `add_text_frame()`
to add text content:

```python
from aspose.slides_foss import Presentation, SaveFormat, ShapeType

prs = Presentation()
slide = prs.slides[0]
shape = slide.shapes.add_auto_shape(ShapeType.RECTANGLE, 50, 50, 400, 150)
tf = shape.add_text_frame("Hello from Aspose.Slides FOSS!")
tf.paragraphs[0].portions[0].portion_format.font_height = 24
prs.save("with_shape.pptx", SaveFormat.PPTX)
```

---

### Step 5: Apply a Fill and Save

Set a solid fill color on the shape before saving:

```python
from aspose.slides_foss import (
    Presentation, SaveFormat, ShapeType, FillType, Color
)

prs = Presentation()
slide = prs.slides[0]
shape = slide.shapes.add_auto_shape(ShapeType.RECTANGLE, 100, 100, 400, 200)
shape.fill_format.fill_type = FillType.SOLID
shape.fill_format.solid_fill_color.color = Color.from_argb(255, 70, 130, 180)
shape.add_text_frame("Styled shape")
prs.save("styled.pptx", SaveFormat.PPTX)
```

## Common Issues and Fixes

**`ModuleNotFoundError: No module named 'aspose'`**
The package is not installed in the active Python environment. Install it (see the Installation
guide) in the same virtual environment you are using to run your script. Confirm with
`pip show aspose-slides-foss`.

**`FileNotFoundError` when calling `Presentation("path")`**
The path you passed does not exist or uses the wrong separator. Use `pathlib.Path` to
construct paths portably:

```python
from pathlib import Path
from aspose.slides_foss import Presentation

prs = Presentation(str(Path("folder") / "existing.pptx"))
```

**`SaveFormat` import error**
Import `SaveFormat` directly from the `aspose.slides_foss` package:
`from aspose.slides_foss import Presentation, SaveFormat`

**Shape added but not visible in output**
Ensure coordinates and dimensions are within the slide boundaries. Default slide dimensions
are 9144000 EMUs × 6858000 EMUs (approximately 12 × 9 inches). Use reasonable values in
EMU or use the `x, y, width, height` parameters in points (1 pt ≈ 12700 EMU).

## Frequently Asked Questions

### Does aspose-slides-foss require Microsoft Office?

No. The library creates and reads `.pptx` files natively in pure Python with no dependency
on Microsoft Office, COM automation, or Windows APIs.

### Which Python versions are supported?

Python 3.10 or later. The package runs on Windows, macOS, Linux, Docker containers, and
serverless functions.

### Is the library free for commercial use?

Yes. It is released under the MIT License. You may use, modify, and redistribute it for
any purpose, including commercial applications.

### Can I load an existing PPTX file?

Yes. Pass the file path to `Presentation`:

```python
from aspose.slides_foss import Presentation, SaveFormat

prs = Presentation("existing.pptx")
print(f"Loaded {len(prs.slides)} slides")
prs.save("copy.pptx", SaveFormat.PPTX)
```

### Can I add multiple slides?

Yes. Use `prs.slides.add_empty_slide(layout)` after obtaining a layout from
`prs.masters[0].layout_slides[0]`.

## See Also

- [FAQ — Aspose.Slides FOSS for Python](https://kb.aspose.org/slides/python/faq/)
- [How to Create Presentations in Python](https://kb.aspose.org/slides/python/how-to-create-presentations-python/)
- [How to Add Shapes in Python](https://kb.aspose.org/slides/python/how-to-add-shapes-python/)
- [Getting Started Docs](https://docs.aspose.org/slides/python/getting-started/)
- [API Reference](https://reference.aspose.org/slides/python/)
- [Aspose.Slides for Python — Enterprise Knowledge Base](https://kb.aspose.com/slides/python/)