Python script hangs on importing rasterio
0
votes
0
answers
164
views
I'm a recent migrant from Linux to OSX, and the transition so far has been quite smooth, until this particular issue.
On a MacBook Pro with the M1 chip, running Ventura 13.1, and with both Python 3.9 and 3.10, my code just freezes during import.
When I run
python -vv my_code.py
, it consistently hangs on:
import 'rasterio._show_versions' #
# trying .../.venv/lib/python3.9/site-packages/rasterio/_version.cpython-39-darwin.so
At this point the terminal is no longer responsive, and I have to kill -9 PID
to terminate the process.
Any ideas on what could this be? I've installed both Python versions with brew install python@3.X
. The virtual environments are created with python3.X -m virtualenv .venv --python=python3.X
(the Python argument is redundant but I wanted to ensure it uses the correct Python version).
The dependencies (proj, gdal, etc) are installed with brew
as well and are available and function correctly.
To complicate things further, in the same environment, if I run python -c "import rasterio"
it works just fine.
Asked by hyit
(101 rep)
Jan 19, 2023, 04:23 PM
Last activity: Jan 19, 2023, 05:26 PM
Last activity: Jan 19, 2023, 05:26 PM