1

I am originally a Fortran programmer, if anything. Last year I begun learning python and now I wanted to use fortranmagic to have a wrapper of f2py, but it is not working. Let me describe the steps I took and the resulting error messages, hoping for some help. I am working with Ubuntu 22.04

  1. I begun by creating an environment conda create -n lf and activating the environment

  2. I installed I few libraries I might need

    conda install numpy scipy matplotlib jupyter nodejs

  3. Following the instructions of the Fortran-magic developer GitHub I run pip install -U fortran-magic

Everything installs fine, but when I create a notebook and execute

%load_ext fortranmagic

I get the following error ModuleNotFoundError: No module named 'fortranmagic' 4. I finally try to install the extensions from jupyter, as it is also suggested in the developer GitHub

%install_ext https://raw.github.com/mgaitan/fortran_magic/master/fortranmagic.py

Yet only to receive the following error UsageError: Line magic function %install_ext not found.

I hope you can help

francescalus
  • 30,576
  • 16
  • 61
  • 96
Jorge Alonso
  • 103
  • 11

0 Answers0