meshpro / pygalmesh

:spider_web: A Python interface to CGAL's meshing tools
GNU General Public License v3.0
580 stars 57 forks source link

SyntaxError: future feature annotations is not defined #185

Closed AnthoineResea closed 2 years ago

AnthoineResea commented 2 years ago

Hi, i'm a basic user of python. I get the error 'SyntaxError: future feature annotations is not defined' when i run:

import pygalmesh
x, y, z = np.meshgrid(x_, y_, z_)

vol = np.empty((50, 50, 50), dtype=np.uint8)
idx = x ** 2 + y ** 2 + z ** 2 < 0.5 ** 2
vol[idx] = 1
vol[~idx] = 0

voxel_size = (0.1, 0.1, 0.1)

mesh = pygalmesh.generate_from_array(
    vol, voxel_size, max_facet_distance=0.2, max_cell_circumradius=0.1
)
mesh.write("ball.vtk")

What's the problem here?

nschloe commented 2 years ago

You need Python 3.7 or newer.

AnthoineResea commented 2 years ago

I'm using 3.8.8.final.0 version of python

nschloe commented 2 years ago

Then I cannot explain it. The code above gives different errors anyway.