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

Impossible to install #27

Closed
assignUser opened this issue Nov 6, 2021 · 18 comments
Closed

Impossible to install #27

assignUser opened this issue Nov 6, 2021 · 18 comments

Comments

@assignUser
Copy link

assignUser commented Nov 6, 2021

It is currently impossible to conda install adel because the binaries/dependencies (like plantgl) don't exists (windows) or were build against an 8 year old glibc version (linux) which makes them impossible to run on any updated system.

I am currently building all dependencies manually and editing the meta.yaml in hope of getting this to work.
Should I have missed an easy solution for this issue I will happily close it.

Edit: this might be more of an issue with plantgl...

@assignUser
Copy link
Author

I just saw that you have a channel with all the dependencies up to date.

@HowcanoeWang
Copy link

I just saw that you have a channel with all the dependencies up to date.

Could give more detail about that "channel"? (any links or url?) I met the same problem...

@assignUser
Copy link
Author

@HowcanoeWang Hey, I found it here: #23
But I did not manage to install it anyway... :(

@HowcanoeWang
Copy link

@assignUser Many thanks! I fought with it the whole night, and decided not use it either :(

@pradal
Copy link
Collaborator

pradal commented Nov 9, 2021

At the end, do you succeed to install Adel?
@mlabadie @christian34 : any insights?

@pradal pradal reopened this Nov 9, 2021
@HowcanoeWang
Copy link

HowcanoeWang commented Nov 9, 2021

At the end, do you succeed to install Adel? @mlabadie @christian34 : any insights?

It seems there are very complex dependency version conflicts that exist via conda, and I also tried python package/setup.py install from source code, neither succeed yet.

Please check this issue: #28

@assignUser
Copy link
Author

@pradal No i tried several different times over several days including manually compiling missing/old dependecies and editing meta.yamls but gave up as there were new conflicts/issues after every fixed problem...

@pradal
Copy link
Collaborator

pradal commented Nov 9, 2021

Thks for your patience. @mlabadie is currently documenting a way to install Adel.
Stay tuned!

@mlabadie
Copy link
Contributor

@assignUser, @HowcanoeWang Sorry for the delay. I update the documentation on branch Port_python_3

To install adel you can follows this ways:

  • conda installation
conda create -n adel -c conda-forge python=3.8 ipython numpy=1.20 pandas rpy2 scipy setuptools=49.6 path -y
  • activate adel environment:
    conda activate adel

  • conda installation of packages
    conda install -c fredboudon -c conda-forge openalea.plantgl openalea.mtg -y

  • install others package from git

    • openalea.deploy package:
    git clone https://github.com/openalea/deploy.git;
    cd deploy;
    python setup.py install
    cd..
    
    • adel package
    git clone -b Port_python_3 https://github.com/openalea-incubator/adel.git
    cd adel
    python setup.py develop
    

@assignUser
Copy link
Author

@mlabadie Thank you, I could install it now without issue. But I can not run any of the examples, after fixing a few encoding issues I got this error KeyError: "'setAdelArv' not found" Which could be "fixed" by commenting out the line trying to set that envvar in AdelR.py which led to:

Traceback (most recent call last):
  File "test_AdelWheat.py", line 2, in <module>
    from alinea.astk.Weather import sample_weather

@HowcanoeWang
Copy link

HowcanoeWang commented Nov 18, 2021

@mlabadie Thanks for your feedback, now it has been successfully installed on my Mac.

@assignUser I met the same encoding problem for Adel.R problem when I run the from alinea.adel.astk_interface import AdelWheat, you could fix it by editing the AdelR.py line 47 to with open(os.path.join(dir,file_name), 'r', encoding="latin-1") as content_file: without commenting out anything.

But still get import error:

Traceback (most recent call last):
  File "test_wheat.py", line 2, in <module>
    from alinea.astk.Weather import sample_weather
ModuleNotFoundError: No module named 'alinea.astk'

@assignUser
Copy link
Author

@HowcanoeWang I used iconv to change the encoding of the file to utf-8.

@NieJL1CN
Copy link

NieJL1CN commented Apr 9, 2022

@assignUser @HowcanoeWang Have you solved these problems yet? I changed the encoding of the file and installed alinea.atsk via conda then the test_Adelwheat.py is somehow running with the error R[write to console]: collapsing to unique 'x' values, so I still can't get the simulation. When I run the other examples, they all have errors too. Referring to other openalea project manuals like Lgrass, I thought I should get a visual wheat virtual model that I could view via openalea.lpy, but in fact that didn't work either.

@pradal
Copy link
Collaborator

pradal commented Apr 9, 2022

We are currently releasing all the stack on a new channel openalea3.
We will test the full suite in the nextdays/week.

@mlabadie @christian34

@assignUser
Copy link
Author

@NieJL1CN I haven't made any other attempts :( But it sounds like there will be a solution soon!

@pradal
Copy link
Collaborator

pradal commented May 12, 2022

Hi @assignUser @NieJL1CN @HowcanoeWang

I just release a new version on openalea3 channel in anaconda.org.
You can test the installation with

conda create -n adel alinea.adel -c openalea3 -c conda-forge

@HowcanoeWang
Copy link

Hi @assignUser @NieJL1CN @HowcanoeWang

I just release a new version on openalea3 channel in anaconda.org. You can test the installation with

conda create -n adel alinea.adel -c openalea3 -c conda-forge

Yes, it seems no problem to install in my WSL2 ubuntu environment

PS: but I got an error when try the following example code:

>>> from alinea.adel.astk_interface import AdelWheat
>>> from alinea.astk.Weather import sample_weather

>>> adel = AdelWheat(nsect=2)
>>> g = adel.setup_canopy(100)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/hwang/miniconda3/envs/adel/lib/python3.9/site-packages/alinea.adel-1.9.0-py3.9.egg/alinea/adel/astk_interface.py", line 154, in setup_canopy
    g = self.build_mtg(canopy, stand,
  File "/home/hwang/miniconda3/envs/adel/lib/python3.9/site-packages/alinea.adel-1.9.0-py3.9.egg/alinea/adel/adel.py", line 226, in build_mtg
    g = mtg_factory(parameters, stand=stand, leaf_sectors=self.nsect,
  File "/home/hwang/miniconda3/envs/adel/lib/python3.9/site-packages/alinea.adel-1.9.0-py3.9.egg/alinea/adel/newmtg.py", line 532, in mtg_factory
    if args.get('HS_final') < args.get('nff'):
TypeError: '>' not supported between instances of 'numpy.ndarray' and 'numpy.str_'

@pradal
Copy link
Collaborator

pradal commented May 14, 2022

Thanks.
I will close this issue and open a new one.
This problem is the same that #29

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

5 participants