-
Has anyone been using spyder or Anaconda to run flopy and run into the issue of not being able to load raster data into the model for a unique grid? My personal struggle is that I am using the sample code suggested by @jlarsen-usgs found at https://github.com/modflowpy/flopy/blob/develop/examples/Notebooks/flopy3_raster_intersection.ipynb However, when I attempt to run my code I am receiving the output: "InuputError: Missing optional dependency 'rasterio'. Use pip or conda to install rasterio." I have followed these suggestions, as well as downloaded it from the Anaconda.org IOOS page directly, and many other suggestions floating around the internets and I am still receiving this error. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
rasterio is the library used inside flopy to handle raster data. If you use anaconda, I suggest you install it inside your flopy environment following the recommendations from their website: |
Beta Was this translation helpful? Give feedback.
-
Make sure you install import sys
print(sys.exec_prefix) and check to see if it's the same as the console where you typed (e.g.) python -c "import sys; print(sys.exec_prefix)" if it's different, then you need to activate the correct environment to install it for use. |
Beta Was this translation helpful? Give feedback.
Make sure you install
rasterio
to the correct conda environment. You can check the environment from your Python console with:and check to see if it's the same as the console where you typed (e.g.)
conda install rasterio
with:python -c "import sys; print(sys.exec_prefix)"
if it's different, then you need to activate the correct environment to install it for use.