Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: fortls installation fails on MS-Windows #1121

Open
2 tasks done
RossBoylan opened this issue Jul 13, 2024 · 0 comments
Open
2 tasks done

bug: fortls installation fails on MS-Windows #1121

RossBoylan opened this issue Jul 13, 2024 · 0 comments
Labels

Comments

@RossBoylan
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

I have tried the Pre-Release of the extension.

  • I have replicated the Issue in the latest Pre-Release

Description

  1. Python installed on the computer (I had 3.12.4 and an earlier version).
  2. In VSCode open a directory with Fortran code.
  3. Open one of the files with fortran code (.f90 in my case). I'm not sure if this step is necessary.
  4. I got 2 notifications in VSCode, both about the need to install the Fortran language server. The first disappeared before I could get it. The 2nd was slightly different; I hit accept to install the server.

The result was "ERROR: pip: fortls failed with code 1" from Modern Fortran (which I think is this code).
The log showed

Executing task: python3 -m pip install --user --upgrade fortls 

python3 : The term 'python3' is not recognized as the name of a cmdlet, function, script file, or 
operable program. Check the spelling of the name, or if a path was included, verify 
that the path is correct and try again.
At line:1 char:1
+ python3 -m pip install --user --upgrade fortls
+ ~~~~~~~
    + CategoryInfo          
    : ObjectNotFound: (python3:String) [], CommandNotFoundException
    + FullyQualifiedErrorId 
    : CommandNotFoundException

Screenshots

No response

Expected Behaviour

The language server would be installed and would then be usable, at least aside from workspaces with their own Python virtual environments. The "then be usable" probably relates to a different bug, #957.

Version of Modern Fortran

3.4.2024061901

Version of Visual Studio Code

1.91.1

Platform and Architecture

MS-Windows Server 2019 Standard (Intel 64 bit)

Additional Information

I don't know if the invocation is using a shell, and if so what shell. But I can think of a number of possible problems:

  1. It's not using my PATH settings (which include C:\Program Files\Python312\Scripts\ and C:\Program Files\Python312\).
  2. Invocation should use Windows-specific py instead of python3.
  3. It needs to include the .exe extension (PowerShell sometimes behaves that way).

I realize the thing that actually invokes pip may not be part of this package, but this is where I'm seeing the problem. And I have been able to install other language servers automatically.

I have in the past installed the language server manually, which is probably what I'll do again to get around this problem.

@RossBoylan RossBoylan added the bug label Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant