{"id":28043,"library":"perlin-noise","title":"Perlin Noise","description":"A Python implementation of Perlin Noise with support for unlimited coordinate space. Current version 1.14, requires Python >=3.9,<3.13. Released under MIT license. Active development with periodic updates.","status":"active","version":"1.14","language":"python","source_language":"en","source_url":"https://github.com/caseman/noise","tags":["perlin-noise","procedural-generation","noise","python"],"install":[{"cmd":"pip install perlin-noise","lang":"bash","label":"Standard install"}],"dependencies":[{"reason":"Required for array operations and noise generation","package":"numpy","optional":false}],"imports":[{"note":"Correct import path (note the underscore in the module name).","symbol":"PerlinNoise","correct":"from perlin_noise import PerlinNoise"},{"note":"Hyphens in package name are not valid in Python import statements; use underscores.","wrong":"from perlin-noise import PerlinNoise","symbol":"PerlinNoise","correct":"from perlin_noise import PerlinNoise"}],"quickstart":{"code":"from perlin_noise import PerlinNoise\nimport numpy as np\n\n# Create a noise object with seed 10\nnoise = PerlinNoise(octaves=4, seed=10)\n\n# Generate 2D noise (e.g., 10x10 grid)\nfreq = 16  # Adjust for desired detail\nxp, yp = np.mgrid[0:10, 0:10] / freq\npic = np.array([[noise([x, y]) for y in yp[0]] for x in xp[:,0]])\n\nprint(pic.shape)  # (10,10)","lang":"python","description":"Create a seeded PerlinNoise object and generate a 2D noise map using a grid of coordinates."},"warnings":[{"fix":"Use 'seed' for current versions; or pin to older versions if needed.","message":"In version 1.0, the seed parameter was named 'seed' but was renamed to 'random_seed' in a later release (<1.10). If using older code, update to 'seed' or check the version.","severity":"breaking","affected_versions":"<1.10"},{"fix":"Scale output manually if needed: e.g., (value + 1) / 2 for [0,1].","message":"The noise output values are not normalized to [0,1] by default; they typically range around [-1,1]. Some users expect a different range.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'from perlin_noise import PerlinNoise' and pass [x,y] or [x,y,z].","message":"The 'PerlinNoise2D' and 'PerlinNoise3D' classes (from older versions) are deprecated; use the general 'PerlinNoise' class with appropriate coordinate dimensions.","severity":"deprecated","affected_versions":">=1.12"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Install with 'pip install perlin-noise' and import as 'from perlin_noise import PerlinNoise'.","cause":"Package name uses hyphen (perlin-noise) but import requires underscore.","error":"ModuleNotFoundError: No module named 'perlin_noise'"},{"fix":"Use noise([x]) for 1D or noise([x, y]) for 2D.","cause":"Passing a single integer as coordinate instead of a list/tuple.","error":"TypeError: argument of type 'int' is not iterable"},{"fix":"Update code to use 'from perlin_noise import PerlinNoise' and pass coordinates as list.","cause":"Using deprecated class name removed in version 1.12+.","error":"AttributeError: module 'perlin_noise' has no attribute 'PerlinNoise2D'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}