daquinterop / Py_DSSATTools

A Python library for crop modeling using DSSAT
GNU General Public License v3.0
54 stars 18 forks source link

Exec Format Error in Example Notebook 1 #30

Closed richard-chen169 closed 6 months ago

richard-chen169 commented 8 months ago

I am on an iMac (version 12.7.2) with a 4 GHz Quad-Core Intel Core i7. I installed Py_DSSATTools using pip in a virtual environment and tried running through the Example 1 (Basics) python notebook. All of the code runs fine until code block 15, where the following code is run. dssat.run( soil=soil, weather=wth, crop=crop, management=man, ) This gives me the error which seems to be an issue with the OS compatibility.

OSError: [Errno 8] Exec format error: '/Users/richard/miniconda3/envs/dssat/lib/python3.12/site-packages/DSSATTools/static/bin/dscsm048'

Is Py_DSSATTools compatible with MacOS? If so, are there any suggestions on how to fix this issue?

daquinterop commented 8 months ago

Hi. Thanks for reporting the issue. Unfortunately I have not tested the library for MacOS so I don't think it'll work. To be honest I don't know if anyone has successfully compiled DSSAT on mac.

richard-chen169 commented 8 months ago

Thanks for replying. Do you know if it runs on both linux and windows systems then?

daquinterop commented 8 months ago

It definitively runs on Linux. It runs on Windows although I have not tested the latest release for Windows. I recommend using it on Linux. If you have a Windows machine the best option is to install WSL and run it there.

zhongpengqun commented 7 months ago

I got this same error on my RaspberryPi 4

I guess it couldn't run on ARM cpu, i run it on x86 arch works

daquinterop commented 6 months ago

I got this same error on my RaspberryPi 4

I guess it couldn't run on ARM cpu, i run it on x86 arch works

Yes, I have never tested it on a Raspberry, probably it won't in an ARM cpu. Thanks for sharing your experience!, it would be interesting to have this working in a ARM cpu.