Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Landlab developer installation issue #190

Open
colineA opened this issue Jul 12, 2022 · 4 comments
Open

Landlab developer installation issue #190

colineA opened this issue Jul 12, 2022 · 4 comments

Comments

@colineA
Copy link

colineA commented Jul 12, 2022

Hi,

I noticed that my landlab was probably not well installed when I ran a script on my laptop and I got different (and wrong) results than on an other laptop.
I decided to create a new environment and reinstall landlab. The whole installation ran well (except the issue with pycharm and the version of Python, but we solved it I think).
I also installed properly cython when error message like ‘landlab.component.bedrock_landslider.cfuncs’ show up.
But when I try to run my script i get an error message that i don't understand...:
landlab issue

What is also weird is that the new environment created don’t manage to install or open spyder…

Thanks for your help!
Coline

@mdpiper
Copy link
Member

mdpiper commented Jul 12, 2022

It looks like this may be a cython issue. I don't have access to a Windows machine right now, but I'll try to reproduce this when I do.

I don't have experience connecting a conda environment in PyCharm or Spyder, so I'll ask for help with that.

@colineA
Copy link
Author

colineA commented Jul 18, 2022

Hi Mark,

I tried an other option; create a new environnement (a new one) with python 3.9 and install spyder inside ( we did it after have installed landlab last time). Then we installed landlab with the normal processing (on the webpage for developper). Any error message appears, everythings ran well. We also reinstalll cython inside the environnment doing: setup.py build_ext -i -f and then pip install -e . again.
So now I am able to open a spyder window in the correct environnment. But when I run my script I still got the same message than on PyCharm: AttributeError: module 'landlab.graph.sort.ext.argsort' has no attribute 'pyx_capi'

I have really no idea what I could try now...
Thanks for your help!
Coline

@mdpiper
Copy link
Member

mdpiper commented Jul 21, 2022

Here are the steps I used to set up a Landlab developer installation on my Windows machine.

Note that all dependencies should be installed in one step--dependency resolution is hard, and conda sometimes has problems if there are multiple install steps (the Landlab docs should be updated to match this).

Using the Anaconda Prompt, change to the directory of the cloned repository and set up a new environment:

conda create -n ldev -c conda-forge --file=requirements.txt --file=requirements-dev.txt --file=requirements-testing.txt --file=requirements-notebooks.txt

Activate the environment:

conda activate ldev

Install Landlab:

pip install -e .

To check the install, I changed to my home directory, started Python, and tried the import you showed above. Here's a screenshot:
landlab-import

I think the most important thing is installing all dependencies in one step.

@colineA
Copy link
Author

colineA commented Jul 22, 2022

Hi Mark,

It is exactly all the command I executed... But what do you mean exactly by 'all dependencies'? Because all these steps ran well for me. The issue comes later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants