[Python] No module named 'distutils.msvccompiler' after using f2py

Discussão em 'Python' iniciado por Stack, Março 31, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to run a fortran module that contains a function that I want to use on Python and apparently what I need to do is run the following line on the terminal

    python -m numpy.f2py -c -m my_module fortrancode.pyf fortrancode.f95

    But when I do so, I get No module named 'distutils.msvccompiler' I am on Mac and I installed setuptools via brew and I still get the same error. Surfing the internet, I saw that some people are having the same issue (see: https://github.com/AnacondaRecipes/numpy-feedstock/pull/94). I am not used to work on the terminal and with Python in general. Could you all please give me a hand? Thank you very much in advance!

    Continue reading...

Compartilhe esta Página