# Problems installing Modern Fortran VS code extension

**URL:** <https://fortran-lang.discourse.group/t/problems-installing-modern-fortran-vs-code-extension/3656>\
**Category:** Uncategorized\
**Created:** [June 3, 2022, 7:11pm UTC](https://fortran-lang.discourse.group/t/problems-installing-modern-fortran-vs-code-extension/3656 "2022-06-03T19:11:08Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rob777](https://avatars.discourse-cdn.com/v4/letter/r/9e8a1a/32.png) [@Rob777](https://fortran-lang.discourse.group/u/Rob777)\
**Post date:** [June 3, 2022, 7:11pm UTC](https://fortran-lang.discourse.group/t/problems-installing-modern-fortran-vs-code-extension/3656/1 "2022-06-03T19:11:08Z")

</div>

Hello,

I’ve been very recently encountering problems installing the Modern Fortran extension for Visual Studio code on openSUSE Leap 15.3 .

After the failed installation it gives me the following errors:

`Linter can't be found in $PATH. Update your settings with a proper path or disable the linter.`

`Error launching fortls: Please check that all selected options are supported by your language server version.`

`Deprecated settings have been detected in your settings. Please update your settings to make use of the new names. The old names will not work.`

Anyone knows how to handle that?

Many Thanks

---

<div class="post-metadata">

**Author:** ![Aurelius\_Nero](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@Aurelius\_Nero](https://fortran-lang.discourse.group/u/Aurelius_Nero)\
**Post date:** [June 3, 2022, 11:08pm UTC](https://fortran-lang.discourse.group/t/problems-installing-modern-fortran-vs-code-extension/3656/2 "2022-06-03T23:08:46Z")

</div>

try `pip install fortls` and tell me if it manages to install after that ?

---

<div class="post-metadata">

**Author:** ![Rob777](https://avatars.discourse-cdn.com/v4/letter/r/9e8a1a/32.png) [@Rob777](https://fortran-lang.discourse.group/u/Rob777)\
**Post date:** [June 4, 2022, 8:05am UTC](https://fortran-lang.discourse.group/t/problems-installing-modern-fortran-vs-code-extension/3656/3 "2022-06-04T08:05:45Z")

</div>

Thank you.

The `fortls` related error is gone but the other two remain and the installation continues to fail.

---

<div class="post-metadata">

**Author:** ![Rob777](https://avatars.discourse-cdn.com/v4/letter/r/9e8a1a/32.png) [@Rob777](https://fortran-lang.discourse.group/u/Rob777)\
**Post date:** [June 4, 2022, 9:02am UTC](https://fortran-lang.discourse.group/t/problems-installing-modern-fortran-vs-code-extension/3656/4 "2022-06-04T09:02:02Z")

</div>

Sorry I’ve to say that only the` linter` error has disappeared.

---

<div class="post-metadata">

**Author:** ![Aurelius\_Nero](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@Aurelius\_Nero](https://fortran-lang.discourse.group/u/Aurelius_Nero)\
**Post date:** [June 4, 2022, 10:58am UTC](https://fortran-lang.discourse.group/t/problems-installing-modern-fortran-vs-code-extension/3656/5 "2022-06-04T10:58:01Z")

</div>

Try referring to this answer and see if it helps ?

> <https://stackoverflow.com/questions/72153608/fortran-language-server-fortls-error-in-vscode-windows/72336810#72336810>

also try looking at this:  
[https://gnikit.github.io/fortls/editor\_integration.html#visual-studio-code](https://gnikit.github.io/fortls/editor_integration.html#visual-studio-code)

If not then , I hope @gnikit will chime in.

---

<div class="post-metadata">

**Author:** ![Rob777](https://avatars.discourse-cdn.com/v4/letter/r/9e8a1a/32.png) [@Rob777](https://fortran-lang.discourse.group/u/Rob777)\
**Post date:** [June 4, 2022, 1:02pm UTC](https://fortran-lang.discourse.group/t/problems-installing-modern-fortran-vs-code-extension/3656/6 "2022-06-04T13:02:36Z")

</div>

Unfortunately neither solution seems to work. The extension has been working for long time and only crashed some weeks ago.

---

<div class="post-metadata">

**Author:** ![Aurelius\_Nero](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@Aurelius\_Nero](https://fortran-lang.discourse.group/u/Aurelius_Nero)\
**Post date:** [June 4, 2022, 1:04pm UTC](https://fortran-lang.discourse.group/t/problems-installing-modern-fortran-vs-code-extension/3656/7 "2022-06-04T13:04:44Z")

</div>

Sorry I wasn’t of much help ☹

---

<div class="post-metadata">

**Author:** ![Rob777](https://avatars.discourse-cdn.com/v4/letter/r/9e8a1a/32.png) [@Rob777](https://fortran-lang.discourse.group/u/Rob777)\
**Post date:** [June 5, 2022, 3:01pm UTC](https://fortran-lang.discourse.group/t/problems-installing-modern-fortran-vs-code-extension/3656/8 "2022-06-05T15:01:32Z")

</div>

Don’t worry.  
I think it can be related to the new release as it’s been working without issues until a couple weeks ago.

---

<div class="post-metadata">

**Author:** ![scottza](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@scottza](https://fortran-lang.discourse.group/u/scottza)\
**Post date:** [June 7, 2022, 11:51am UTC](https://fortran-lang.discourse.group/t/problems-installing-modern-fortran-vs-code-extension/3656/9 "2022-06-07T11:51:26Z")

</div>

I experienced similar behaviour recently on Ubuntu. There was a problem with one of the Python packages that fortls depends on. Luckily it was auto-magically fixed after a few days.

Maybe try something like

fortls --version

at the command prompt to see if it sheds some light on the problem?

---

<div class="post-metadata">

**Author:** ![gnikit](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/gnikit/32/1213_2.png) [@gnikit](https://fortran-lang.discourse.group/u/gnikit)\
**Post date:** [June 7, 2022, 4:16pm UTC](https://fortran-lang.discourse.group/t/problems-installing-modern-fortran-vs-code-extension/3656/10 "2022-06-07T16:16:42Z")

</div>

Apologies for the delay @Rob777 I have been rather busy and didn’t see this.

## Linter

So the linter would refer to `gfortran` or `ifort`. We changed the option

```json
"fortran.linter.compilerPath": ""

```

To mean the full path to the compiler you are using for the linter instead of compiler’s root.  
So now you have to input `/my/custom/dir/gfortran` instead of `/my/custom/dir` if you want to use the non-default compiler version.

## fortls - Language Server

Nothing has changed in the language server side of things so I am not sure what that warning is about.  
Please paste all the options that you are passing the `fortls` along with the version that you are using.

## Deprecated settings

A lot of settings have been renamed and some have become obsolete. Please open your Settings to see which ones, they are highlighted with deprecation warnings.

---

<div class="post-metadata">

**Author:** ![Rob777](https://avatars.discourse-cdn.com/v4/letter/r/9e8a1a/32.png) [@Rob777](https://fortran-lang.discourse.group/u/Rob777)\
**Post date:** [June 7, 2022, 4:51pm UTC](https://fortran-lang.discourse.group/t/problems-installing-modern-fortran-vs-code-extension/3656/11 "2022-06-07T16:51:59Z")

</div>

Thank you so much.

The field

```auto
"fortran.linter.compilerPath": ""

```

was empty so adding the full path to gfortran solved the problem related to linter.

Please find in the image below the only two highlighted errors in my settings.

 ![fortls_settings](https://global.discourse-cdn.com/free1/uploads/fortran_lang/original/2X/3/39634fa8e89383fa7dfd03cf152a9510028dcb0d.png)

Below is my settings.json :

```auto
{
    "workbench.colorTheme": "Default Dark+",
    "fortran.gfortranExecutable": "/usr/bin/gfortran-11",
    "fortran.includePaths": [],
    "editor.fontSize": 16,
    "fortran.linter.compilerPath": "/usr/bin/gfortran-11",
    "fortran.fortls.path": "/home/username/.local/bin/fortls",
    "fortran.linter.extraArgs": [
    
    ],
    "fortran.formatting.findentArgs": [
    
    ]
      
}

```

Thanks

---

<div class="post-metadata">

**Author:** ![gnikit](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/gnikit/32/1213_2.png) [@gnikit](https://fortran-lang.discourse.group/u/gnikit)\
**Post date:** [June 7, 2022, 5:15pm UTC](https://fortran-lang.discourse.group/t/problems-installing-modern-fortran-vs-code-extension/3656/12 "2022-06-07T17:15:06Z")

</div>

> [@Rob777](#):
>
> was empty so adding the full path to gfortran solved the problem related to linter.

Good to hear 🙂

* * *

If you see in your settings.json 2 of your settings are underlined with yellow color,

```
"fortran.gfortranExecutable": "/usr/bin/gfortran-11",
"fortran.includePaths": [],

```

Remove those and the deprecation warnings will go away.

---

<div class="post-metadata">

**Author:** ![Rob777](https://avatars.discourse-cdn.com/v4/letter/r/9e8a1a/32.png) [@Rob777](https://fortran-lang.discourse.group/u/Rob777)\
**Post date:** [June 7, 2022, 5:18pm UTC](https://fortran-lang.discourse.group/t/problems-installing-modern-fortran-vs-code-extension/3656/13 "2022-06-07T17:18:55Z")

</div>

Thank you so much!  
There’s the fortls warning left… 😅

The path to fortls is correct

```auto
user@localhost:~> ls /home/user/.local/bin/fortls
/home/user/.local/bin/fortls

```

---

<div class="post-metadata">

**Author:** ![gnikit](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/gnikit/32/1213_2.png) [@gnikit](https://fortran-lang.discourse.group/u/gnikit)\
**Post date:** [June 7, 2022, 5:21pm UTC](https://fortran-lang.discourse.group/t/problems-installing-modern-fortran-vs-code-extension/3656/14 "2022-06-07T17:21:24Z")

</div>

what version are you using? fortls --version

---

<div class="post-metadata">

**Author:** ![Rob777](https://avatars.discourse-cdn.com/v4/letter/r/9e8a1a/32.png) [@Rob777](https://fortran-lang.discourse.group/u/Rob777)\
**Post date:** [June 7, 2022, 5:28pm UTC](https://fortran-lang.discourse.group/t/problems-installing-modern-fortran-vs-code-extension/3656/15 "2022-06-07T17:28:27Z")

</div>

Mmm I get this error

```auto
u@localhost:~/dev> fortls --version
Traceback (most recent call last):
  File "/home/u/.local/bin/fortls", line 5, in <module>
    from fortls. __init__ import main
  File "/home/u/.local/lib/python3.6/site-packages/fortls/ __init__.py", line 10, in <module>
    from .helper_functions import resolve_globs, only_dirs
  File "/home/u/.local/lib/python3.6/site-packages/fortls/helper_functions.py", line 1
    from __future__ import annotations
    ^
SyntaxError: future feature annotations is not defined

```

---

<div class="post-metadata">

**Author:** ![gnikit](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/gnikit/32/1213_2.png) [@gnikit](https://fortran-lang.discourse.group/u/gnikit)\
**Post date:** [June 7, 2022, 6:01pm UTC](https://fortran-lang.discourse.group/t/problems-installing-modern-fortran-vs-code-extension/3656/16 "2022-06-07T18:01:10Z")

</div>

You need to have python 3.7 Or higher for fortls to work. I suspect you are using py3.6 which has reached end of life.

You can install a higher version of python or download miniconda locally and install fortls through that. If you use miniconda I would still recommend you install fortls with pip and not conda-forge

---

<div class="post-metadata">

**Author:** ![Rob777](https://avatars.discourse-cdn.com/v4/letter/r/9e8a1a/32.png) [@Rob777](https://fortran-lang.discourse.group/u/Rob777)\
**Post date:** [June 7, 2022, 6:28pm UTC](https://fortran-lang.discourse.group/t/problems-installing-modern-fortran-vs-code-extension/3656/17 "2022-06-07T18:28:35Z")

</div>

Thank you so much! The problem is solved!

For anyone using open-suse

`sudo zypper in python39`  
then  
`pip3.9 install fortls`

That’s all.

---

<div class="post-metadata">

**Author:** ![Aurelius\_Nero](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@Aurelius\_Nero](https://fortran-lang.discourse.group/u/Aurelius_Nero)\
**Post date:** [June 7, 2022, 6:35pm UTC](https://fortran-lang.discourse.group/t/problems-installing-modern-fortran-vs-code-extension/3656/18 "2022-06-07T18:35:40Z")

</div>

mark it as a solution 🙂
