Registry / data / pyproj

pyproj

JSON →
library3.7.2pypypi✓ verified 27d ago

pyproj is a Python interface to PROJ, a powerful C library for cartographic projections and coordinate transformations. It enables precise coordinate reference system (CRS) operations, geodesic computations, and transformation between different spatial reference systems with high accuracy and comprehensive EPSG support. The library is actively maintained with frequent releases, currently at version 3.7.2.

pip install pyproj
INSTALL
IMPORT
SIG · PYPROJ
P
pyproj
datapythonv3.7.2
Install
1.9s avg
Import
234ms
Disk
47MB
Pass rate
9/ 10
Env Coverage9 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.7.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 1.9s
py 3.11
✓ —
✓ 2s
py 3.12
✓ —
✓ 1.8s
py 3.13
✓ —
✓ 1.8s
py 3.9
✕ build_error
✓ 2.2s
47MB installed
● package 47MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CRS
from pyproj import CRS
Used for defining Coordinate Reference Systems.
Transformer
from pyproj import Transformer
The modern and recommended class for performing coordinate transformations.
Proj
from pyproj import Proj
from pyproj import Proj; p = Proj(init='epsg:4326')
While still available for backward compatibility, `pyproj.Proj` is a legacy interface. `pyproj.Transformer` is the recommended and more robust approach for transformations, especially for `CRS` to `CRS` conversions. Initializing with `init` is deprecated.
Geod
from pyproj import Geod
Used for geodesic calculations (e.g., distances, areas, forward/inverse problems on an ellipsoid).

This quickstart demonstrates how to perform a basic coordinate transformation from WGS84 geographic coordinates (longitude, latitude) to UTM Zone 33N projected coordinates (easting, northing) using `pyproj.CRS` to define the coordinate systems and `pyproj.Transformer` for the transformation. The `always_xy=True` parameter ensures a consistent (x, y) or (longitude, latitude) axis order.

from pyproj import CRS, Transformer # Define source and target Coordinate Reference Systems (CRSs) wgs84 = CRS('EPSG:4326') # WGS84 Geographic CRS (longitude, latitude) utm_zone_33n = CRS('EPSG:32633') # UTM Zone 33N Projected CRS (easting, northing) # Create a transformer, ensuring consistent axis order (x, y / lon, lat) transformer = Transformer.from_crs(wgs84, utm_zone_33n, always_xy=True) # Define a point in WGS84 (longitude, latitude) lon, lat = 10.0, 60.0 # Transform the point x, y = transformer.transform(lon, lat) print(f"Original WGS84 (lon, lat): ({lon}, {lat})") print(f"Transformed UTM Zone 33N (easting, northing): ({x:.2f}, {y:.2f})") # Transform multiple points points_wgs84 = [(10.0, 60.0), (11.0, 61.0), (12.0, 62.0)] transformed_points_utm = list(transformer.itransform(points_wgs84)) print(f"Transformed multiple points: {transformed_points_utm}")
Debug
Known issues
breakingMinimum Python version required for pyproj has increased significantly in recent 3.x releases. For pyproj 3.7.2, Python 3.11 or newer is required.
fix
Upgrade your Python environment to 3.11 or newer, or use an older pyproj version compatible with your Python version. (e.g., pyproj 3.6.0 for Python 3.9+, pyproj 3.7.0 for Python 3.10+).
affects: 3.7.2+
breakingMinimum PROJ C library version required for pyproj has increased. For pyproj 3.7.2, PROJ 9.4 or newer is required.
fix
Ensure your system's PROJ installation meets the minimum requirement (PROJ 9.4+). If installing via pip, wheels often bundle PROJ, but if building from source or using conda, verify your PROJ version.
affects: 3.7.2+
deprecatedThe `pyproj.Proj` class is considered a legacy interface. Its `init` keyword for initialization is deprecated.
fix
Migrate to `pyproj.CRS` for defining Coordinate Reference Systems and `pyproj.Transformer` for performing transformations. For example, instead of `Proj(init='epsg:4326')`, use `CRS('EPSG:4326')` and `Transformer.from_crs()`.
affects: 3.0.0+
gotchapyproj 3.x wheels no longer include transformation grids by default. These grids are crucial for certain high-accuracy datum transformations (e.g., NAD27 to NAD83).
fix
You may need to manually manage PROJ's data directory or install transformation grid packages separately. Consult the pyproj documentation on 'Transformation Grids' for guidance.
affects: 3.0.0+
gotchaWhen performing transformations, the axis order (e.g., longitude/latitude vs. latitude/longitude, or easting/northing vs. northing/easting) can be a source of confusion. By default, PROJ might use different axis orders based on CRS definition.
fix
Always use `always_xy=True` when creating a `Transformer` instance to ensure consistent (x, y) or (longitude, latitude) input and output order, which aligns with common GIS conventions.
affects: 2.2.0+
breakingThe default value for `return_back_azimuth` in `fwd_intermediate` and `inv_intermediate` methods of `pyproj.Geod` changed from `False` to `True` to match `fwd` and `inv` methods.
fix
If your code relies on the previous default behavior, explicitly set `return_back_azimuth=False` when calling `fwd_intermediate` or `inv_intermediate`.
affects: 3.5.0+
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pyproj'
The pyproj library is not installed in your current Python environment.
fix
pip install pyproj
DeprecationWarning: `transform` is deprecated. Use `pyproj.Transformer.from_crs` instead.
The direct `pyproj.transform()` function is deprecated in pyproj 2.x and 3.x; the recommended approach is to use `pyproj.Transformer.from_crs()` for better control and performance.
fix
Replace `pyproj.transform(crs_from, crs_to, x, y)` with `transformer = pyproj.Transformer.from_crs(crs_from, crs_to, always_xy=True); x2, y2 = transformer.transform(x, y)`.
pyproj.exceptions.CRSError: Invalid projection string: +init=epsg:4326
The `+init=` syntax for defining a CRS is deprecated and no longer directly supported by the underlying PROJ library in modern `pyproj` versions, leading to an invalid string error.
fix
Replace deprecated `+init=epsg:XXXX` with the modern `EPSG:XXXX` string when defining CRSs (e.g., `pyproj.CRS('EPSG:4326')`).
NameError: name 'Proj' is not defined
In pyproj versions 2.x and later, the `Proj` class is not automatically imported into the top-level `pyproj` namespace and its functionality is largely superseded by `CRS` and `Transformer`.
fix
For CRS definitions, use `pyproj.CRS()`. For transformations, use `pyproj.Transformer.from_crs()`. If `Proj` is strictly needed, import it explicitly with `from pyproj import Proj`.
Upgrade
Version history
3.7.2latest on PyPI · released Aug 14, 2025
Audit
Dependencies
PythonrequiredMinimum supported Python version is 3.11 for pyproj 3.7.2.
PROJrequiredpyproj is a wrapper around the PROJ C library; minimum supported PROJ version is 9.4 for pyproj 3.7.2.
Transformation Gridsoptionalpyproj 3+ wheels do not include transformation grids; these may need to be obtained separately for certain high-accuracy transformations.
Agent activity
14 hits · last 30 days
node
12
Resources
pyproj — pip install pyproj · libregistry