I have a problem with LFortran installation

Yes, that is correct, in Fortran 2/3 is an integer division, so the result is 0.

1 Like

Awesome, I am glad it works now. Yes, the Python issues that you discovered are precisely the reason we switched from Python to C++ as the implementation of LFortran. The issues with Python can be summarized as follows:

  • The various Python libraries that Jupyter depends on are not always compatible
  • You only find out at runtime, and typically get some obscure error message such as the ones above
  • There are multiple mechanisms how to install Python packages, and none has became the clear winner yet, although Conda is pretty close; And if you mix and match these mechanisms, things will fail, as you saw above

C++ is unfortunately also missing a package manager (there are several, and none is a clear winner), but in my experience if it compiles, it almost always works. So at least we don’t have to deal with these runtime issues in C++ (or Fortran). The issue still remains how to make it easy to compile. For now Conda is a nice solution as it is already compiled there, but if you want to build from source, it’s not easy. For Fortran I think fpm will fix this. C++ currently doesn’t have a solution like that, but if we can improve fpm to also work for C++, which technically I am pretty sure we can, then I’d be happy to use it for LFortran also.

Thank you very much for your support and help. I’ve been using Fortran as the core of the numerical models that I’m working on for a few years, and I enjoy it. Sadly, I do not have the knowledge to contribute to the improvement and development of LFORTRAN, but if there were anything I could do, I would enjoy it.
I believe that LFORTRAN is a potent language. I did a simple test with a simple loop, both in LFORTRAN and Python, and LFORTRAN showed its speed very well. I am not sure if it is possible, but if users can easily add and use packages just like in Python, I think that would be ideal.