Welcome, Guest
Username: Password: Remember me

TOPIC: Using the API in a python environment

Using the API in a python environment 5 months 2 days ago #43818

  • DeVos_TUM
  • DeVos_TUM's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 2
Hello all,

I am trying to use the Telemac API within the Spyder environment on Windows. I installed Telemac on my laptop using the automatic installer.

The Postel scripts worked, after I included "C:\TELEMAC\V8P4\external\python-3.10.9" in my PYTHONPATH.

Then I moved on to the telemac2d_example. I first got the following error when creating the Telemac object:
"TelemacException: Error: unable to load the dynamic library _api.dll
You can check the environment variable: PYTHONPATH
No module named '_api'"

I found the dynamic library in "C:\TELEMAC\V8P4\builds\gnu.static\wrap_api\lib", so I also added this to my PYTHONPATH.

I attached the error, it fails in telemac_dico.py. I also attached my python script.

I am grateful for any guidance, maybe there might something fundamental that I am missing, since I just recently started using python again.

Kind regards
Frederik
Attachments:
The administrator has disabled public write access.

Using the API in a python environment 5 months 2 days ago #43819

  • DeVos_TUM
  • DeVos_TUM's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 2
To clarify:
I get the attached error, after I add the location of the dynamic library to the PYTHONPATH, when creating the Telemac object.
The administrator has disabled public write access.

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.