# Why the "P3D renderer is not in the class path"?

**URL:** <https://discourse.processing.org/t/why-the-p3d-renderer-is-not-in-the-class-path/47257>\
**Category:** py5\
**Created:** [September 30, 2025, 8:56pm UTC](https://discourse.processing.org/t/why-the-p3d-renderer-is-not-in-the-class-path/47257 "2025-09-30T20:56:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![larrycuba](https://avatars.discourse-cdn.com/v4/letter/l/e95f7d/32.png) [@larrycuba](https://discourse.processing.org/u/larrycuba)\
**Post date:** [September 30, 2025, 8:56pm UTC](https://discourse.processing.org/t/why-the-p3d-renderer-is-not-in-the-class-path/47257/1 "2025-09-30T20:56:20Z")

</div>

i’m begging to use Py5Graphics with the command:

pg = py5.create\_graphics( 500, 500, ‘P3D’)

and later when i begin to draw into this window, i get the error:

“The P3D renderer is not in the class path”

How is the class path specified?

thank you.

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [September 30, 2025, 9:33pm UTC](https://discourse.processing.org/t/why-the-p3d-renderer-is-not-in-the-class-path/47257/2 "2025-09-30T21:33:49Z")

</div>

This runs without error in Thonny:

```python
import py5

def setup():
    global pg
    
    py5.size(400, 400, py5.P2D)
    pg = py5.create_graphics(40, 40, py5.P3D)

py5.run_sketch()

```

Documentation is here if you haven’t already seen it:

> **[Welcome to py5! — py5 documentation](https://py5coding.org)**

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [September 30, 2025, 9:34pm UTC](https://discourse.processing.org/t/why-the-p3d-renderer-is-not-in-the-class-path/47257/3 "2025-09-30T21:34:42Z")

</div>

> [@larrycuba](#):
>
> `pg = py5.create_graphics(500, 500, 'P3D')`

We’re supposed to use the already-defined constant `P3D` for the renderer parameter:

> **[size() — py5 documentation](https://py5coding.org/reference/sketch_size.html)**

Which corresponds to the string `'processing.opengl.PGraphics3D'`; not `'P3D'`:

> **[Constant Field Values](https://processing.github.io/processing-javadocs/core/constant-values.html#processing.core.PConstants.P3D)**

`pg = py5.create_graphics(500, 500, py5.P3D)`

---

<div class="post-metadata">

**Author:** ![larrycuba](https://avatars.discourse-cdn.com/v4/letter/l/e95f7d/32.png) [@larrycuba](https://discourse.processing.org/u/larrycuba)\
**Post date:** [September 30, 2025, 10:09pm UTC](https://discourse.processing.org/t/why-the-p3d-renderer-is-not-in-the-class-path/47257/4 "2025-09-30T22:09:31Z")

</div>

ok, but when i use:

> pg = py5.create\_graphics(600,600, py5.P3D)

then when it gets to the code:

> pg.rotate\_x(rx)

i get the error:

> rotateX() can only be used with a renderer that supports 3D, such as P3D

can you tell what i’m doing wrong from this?

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [September 30, 2025, 10:56pm UTC](https://discourse.processing.org/t/why-the-p3d-renderer-is-not-in-the-class-path/47257/5 "2025-09-30T22:56:29Z")

</div>

In order to **create\_graphics()** w/ constant P3D, it’s also required to call **size()** w/ P3D or P2D:

> **[create\_graphics() — py5 documentation](https://py5coding.org/reference/sketch_create_graphics.html)**

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [October 1, 2025, 12:47am UTC](https://discourse.processing.org/t/why-the-p3d-renderer-is-not-in-the-class-path/47257/6 "2025-10-01T00:47:55Z")

</div>

Hello @larrycuba ,

A working example using a rotation in the PGraphic and outside of it:

```processing
import py5

global pg
global counter
global angle

def setup():
    py5.size(200, 200, py5.P3D)

    global counter
    global angle
    counter = 0
    angle = 0

    global pg
    pg = py5.create_graphics(60, 60, py5.P3D)
    
    pg.begin_draw()
    pg.background(100, 0)
    pg.lights()
    pg.no_stroke()
    pg.fill(255, 0, 0)
    pg.translate(30, 30)
    pg.rotate(py5.TAU / 8, 0, 1, 0)
    pg.box(25)
    pg.end_draw()

def draw():
    global counter
    global angle
    
    py5.background(200)

    py5.translate(py5.width / 2, py5.height / 2)
    py5.image_mode(py5.CENTER)
    counter += 1
    angle = counter * (py5.TAU / 360)
    py5.rotate(angle, 0, 1, 0)
    py5.image(pg, 0, 0)

py5.run_sketch()

```

This is the environment I am using:

> **[Welcome to py5! — py5 documentation](https://py5coding.org/)**

`:)`
