You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following error may occur when trying to import pyproj into a QGIS plugin
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Abandon (core dumped)
I was able to identify that this error only occurs when the pyproj package has been installed using pip
The error does not occur if the package has been installed using a package manager, for example for ubuntu
sudo apt install python3-pyproj
This error was observed on several versions of linux (ubuntu/fedora) and on different versions of QGIS (3.28/ 3.34).
There doesn't seem to be any link with the pyproj version (installing an identical or more recent version using pip systematically causes the error)
To reproduce
Simply add :
import pyproj
to a plugin QGIS source files and install pyproj using pip. QGIS should stop while loading the plugin with the bad_alloc error.
The text was updated successfully, but these errors were encountered:
I was able to identify that this error only occurs when the pyproj package has been installed using pip
fully expected and nothing one can do about, expect: never use pip with binary wheels, but in trivial use cases. And QGIS is not a trivial use case. The issue here is that pyproj installed through pip goes with its own libproj that conflicts with the libproj used by QGIS.
Problem description
The following error may occur when trying to import pyproj into a QGIS plugin
I was able to identify that this error only occurs when the pyproj package has been installed using pip
The error does not occur if the package has been installed using a package manager, for example for ubuntu
This error was observed on several versions of linux (ubuntu/fedora) and on different versions of QGIS (3.28/ 3.34).
There doesn't seem to be any link with the pyproj version (installing an identical or more recent version using pip systematically causes the error)
To reproduce
Simply add :
to a plugin QGIS source files and install pyproj using pip. QGIS should stop while loading the plugin with the bad_alloc error.
The text was updated successfully, but these errors were encountered: