Welcome, Guest
Username: Password: Remember me

TOPIC: Compilation fails when building the python API

Compilation fails when building the python API 1 year 9 months ago #42050

  • MartinPHYS
  • MartinPHYS's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 24
  • Thank you received: 1
Hello,

I am having a hard time getting the basic version (no parallel computing) of telemac to compile properly on my machine. I am attempting to install the linux version of telemac on my windows machine via windows subsystem for linux. Everything seems to work properly until the build for the python API begins when the following error is triggered:

utils.exceptions.TelemacException: Error during first part of f2py for api 127
/bin/sh: 1: f2py: not found

I cannot get f2py to work on its own, which I expect is causing this problem. When I run f2py without an argument in the ubuntu shell I get:

Command 'f2py' not found, but can be installed with:
sudo apt install python-numpy

(this suggested 'sudo apt install python-numpy' command does not work)

When I run f2py without an argument in a python terminal I get:

>>> f2py
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'f2py' is not defined


I suspect something is wrong with my file paths for python as I frequently use python through anaconda for other applications. I tried adding the python scripts folder to the top of the windows PATH in environmental variables, but it did not work. As of now I am lost and cannot seem to find a good fix online.

Let me know if I can provide additional information and thank you for your help,

Martin
The administrator has disabled public write access.

Compilation fails when building the python API 1 year 9 months ago #42068

  • borisb
  • borisb's Avatar
  • OFFLINE
  • Admin
  • Posts: 128
  • Thank you received: 64
Hello Martin,

F2PY is provided with NumPy, which is therefore necessary to build the Python wrappers for the Telemac Fortran API. You can install NumPy using either PIP or your Linux package manager.
The administrator has disabled public write access.
The following user(s) said Thank You: MartinPHYS

Compilation fails when building the python API 1 year 9 months ago #42081

  • MartinPHYS
  • MartinPHYS's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 24
  • Thank you received: 1
ahh, thanks so much it has compiled correctly now!

Installing numpy through a unbuntu command prompt did the trick. I used PIP for this.
The administrator has disabled public write access.
Moderators: borisb

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