Open colineA opened 2 years ago
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.
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 buildext -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
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:
I think the most important thing is installing all dependencies in one step.
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.
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...:
What is also weird is that the new environment created don’t manage to install or open spyder…
Thanks for your help! Coline