landlab: Problem with developer install

Following the Developer Install instructions here leads to the following:

(base) cu-biot-seec1-172:Landlab gtucker$ conda create --name landlab-dev
Channels:
 - conda-forge
 - defaults
Platform: osx-64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /Applications/anaconda3/envs/landlab-dev



Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate landlab-dev
#
# To deactivate an active environment, use
#
#     $ conda deactivate

(base) cu-biot-seec1-172:Landlab gtucker$ conda activate landlab-dev
(landlab-dev) cu-biot-seec1-172:Landlab gtucker$ git clone https://github.com/landlab/landlab.git
Cloning into 'landlab'...
remote: Enumerating objects: 76799, done.
remote: Counting objects: 100% (3678/3678), done.
remote: Compressing objects: 100% (1694/1694), done.
remote: Total 76799 (delta 2347), reused 3091 (delta 1946), pack-reused 73121
Receiving objects: 100% (76799/76799), 282.36 MiB | 53.06 MiB/s, done.
Resolving deltas: 100% (56601/56601), done.
Updating files: 100% (1252/1252), done.

(landlab-dev) cu-biot-seec1-172:Landlab gtucker$ cd landlab
(landlab-dev) cu-biot-seec1-172:landlab gtucker$ conda install --file=requirements.in -c nodefaults -c conda-forge --override-channels

CondaValueError: could not parse 'importlib-resources; python_version < '3.12'' in: requirements.in

(system = Mac OS 14.5)

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 17 (15 by maintainers)

Most upvoted comments

When you started Python, do you start it from the command line or do you run Python through an IDE like Spyder? Do you still see the import error if you try to import landlab from the command line using the following,

conda activate landlab_dev
python -c 'import landlab; print(landlab.__version__)'

For me, this prints,

2.9.2.dev0

This last time, did you start with a clean working environment? It could be that one or more of the extension modules in your landlab folder is left over from a previous build and needs to be rebuilt. You my need to remove all of the shared libraries in your source folder and recompile. You could do this by trashing your landlab folder and rebuilding, or if you don’t want to be that extreme, try running,

pip install nox
nox -s clean

and then running the build commands again.

@mcflugen thanks! i was like it seemed similar but wasn’t sure.

BUT probably compilers just need to be installed first…

We should still support conda installs, though. Unfortunately, conda doesn’t understand pip requirements files so we may have to have different instructions if someone would like to install all of Landlab’s dependencies with conda.