-
Notifications
You must be signed in to change notification settings - Fork 3
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
name 'load_default_simulations' is not defined #14
Comments
Hello, which operating system are you using? Did you install .Net core? |
Please remember the following information: You can add the APSIM binary folder to the system path or use the config module to change the APSIM binary folder path. You don't need to build from source. All you need to do is install APSIM and then add the path to the Python environment. if you open the edit system environment variables and you can see APSIM or Models in there Please do the following: # search for the program binary installation path and add to os.environ as follows
import os
# A more intuitive way is to use apsimNGpy config Module
from apsimNGpy.config import Config
# now set the path to ASPIMX binaries
Config.set_aPSim_bin_path(path = r'path/toyourapsimbinaryfolder/bin)
# in the pythonnet_config module, priority is first given to the user supplied binary path, we also search through the python global env using the os module,
# if that fail it searches through other sources such as the user program installation folders.
# Not sure whether this can work all the time but you can try changing through os.environ as follows:
os.environ['APSIM'] =r'path/toyourapsimbinaryfolder/bin
# or
os.environ['Models'] =r'path/toyourapsimbinaryfolder/bin |
[Running] python -u "k:\for apsim prog\APSIMNGPY\test1.py"
Traceback (most recent call last):
File "k:\for apsim prog\APSIMNGPY\test1.py", line 18, in
soybean_model = load_default_simulations(crop = 'soybean') # don't worry it is not case senstive
^^^^^^^^^^^^^^^^^^^^^^^^
NameError: name 'load_default_simulations' is not defined
'we installed the requirements except building the APSIM from its source code , we have considered using the https://www.apsim.info/documentation/model-documentation/developer-documentation/building-apsim-from-source/
but we tried to run the usage code first but it is not working so far , we don't know if it is related to the paths or is it necessary to build the APSIM ?
thank you .
The text was updated successfully, but these errors were encountered: