openalea / plantgl

An open-source graphic toolkit for the creation, simulation and analysis of 3D virtual plants.
Other
59 stars 23 forks source link

Push openalea.plantgl into conda-forge #35

Closed pradal closed 9 months ago

pradal commented 4 years ago

Add openalea.plantgl in conda-forge.

Corilana commented 4 years ago

Hello, i had attached conda-forge to the base(root) environment (WINDOWS10, conda 4.8) with tis command: conda config --append channels conda-forge

but when i run conda install -c openalea openalea.plantgl or the other commands that i found here https://anaconda.org/openalea/openalea.plantgl

conda says PackagesNotFoundError: The following packages are not available from current channels:

Current channels:

To search for alternate channels that may provide the conda package you're looking for, navigate to

https://anaconda.org

and use the search bar at the top of the page.

what can i do?? it happens olso with other packages (visuale, mtg for examples)

catwold commented 3 years ago

Hello,I also encountered the same problem, I would like to ask you how to install the openalea.plantgl package.Thank you!

pradal commented 3 years ago

Up for now the openalea channel is not up to date. You can use the fredboudon channel: conda install -c conda-forge -c fredboudon openalea.plantgl

lso you can contact @fredboudon

catwold commented 3 years ago

Thank you very much for your reply. Seeing that you have also participated in the development of the RATP model package, how your RATP model script runs in anaconda?

Script to run RATP

Copyright: FengNan Cheng , nange6s@163.com

Northwest A&F University

2021-9-27

import os import shutil import numpy as np import openalea.plantgl.all as pgl from alinea.pyratp.grid import Grid from alinea.pyratp.vegetation import Vegetation from alinea.pyratp.micrometeo import MicroMeteo from alinea.pyratp.skyvault import Skyvault from alinea.pyratp.runratp import runRATP from alinea.pyratp.RATP2VTK import RATP2VTK,RATPVOXELS2VTK from alinea.pyratp_wralea.ExtractLight import * WorkDir = "your directory" os.chdir(WorkDir)

Several folders were created and change to your folders

If necessary, just delete or modify as you want

Treatments = ["Fuji"] #change to yours ResuFolder = "\Resu" appletrees=["Fuji81","Fuji82","Fuji83"] #change the name to yours nbtreat = 0 nbtree = 0 grdfile='gridall.grd' #Grid vfnfile= Treatments[nbtreat]+'.vfn' #List of plant functioning files skyfile='skyvaultsoc.skv' #Turtle metfile='meteoyear_2011.mto' #Meteo, change the name to yours

PathInputFiles=WorkDir+'\'+Treatments[nbtreat] vgxfile = appletrees[nbtree]+'.vgx' #3D plant filenames vgxfolder = appletrees[nbtree]

Create folders for each Apple tree file

PathOutputFiles=WorkDir+'\'+Treatments[nbtreat]+ResuFolder PathAppleTree=PathOutputFiles+'\'+vgxfolder PathInputFiles

Processes#### Initialize the grid from a grid file

grid = Grid.read(WorkDir+'\'+grdfile) entity, x, y, z, s, n = Grid.readVgx(PathInputFiles+'\'+vgxfile,0.7124) grid,map = Grid.fill(entity, x, y, z, s, n, grid) vegetation = Vegetation.read(PathInputFiles+'\'+vfnfile)#

Sky

sky = Skyvault.read(WorkDir+'\'+skyfile) met = MicroMeteo.read(WorkDir+'\'+metfile) res = runRATP.DoAll(grid, vegetation, sky, met) if not os.path.exists(PathAppleTree): os.mkdir(PathAppleTree) print("Directory " , PathAppleTree, " Created ") else:
print("Directory " ,PathAppleTree, " already exists")

save result

ftree = open(PathAppleTree+'/tree.txt','w') ftree.write('ntime day hour VegetationType TotalIrradiation AirTemperature TreePhotosynthesis TreeTranspiration') ftree.write('\n') np.savetxt(ftree,res[1],'%.6e') ftree.close() When I put it in anaconda to run, it will appear: Traceback(most recent call last): File "E:\Script_runRATP.py",line 8, in import openalea.plantgl.all as pgl ImportError: No module named plantgl.all I don't know how to solve this problem.

christian34 commented 2 years ago

May be a first valuable helping start could be to push pyqglviewer on conda-forge ? (see #45)

pradal commented 9 months ago

Done in the new release

conda create -n plantgl -c openalea3 -c conda-forge openalea.plantgl