swyddfa / esbonio

A language server for working with Sphinx projects.
https://docs.esbon.io/
131 stars 21 forks source link

Language Server installation does not work on Windows #137

Closed alcarney closed 1 year ago

alcarney commented 3 years ago

Allowing the extension to automatically install the Language Server when a conda envrionment is configured does not work. Something about them is different enough that simply calling the corresponding python executable is not sufficient to allow it to discover all the supporting libraries it needs.

> Executing task: C:\Users\....\Anaconda3\envs\name\python.exe -m pip install esbonio[lsp] <

WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/esbonio/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/esbonio/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/esbonio/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/esbonio/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/esbonio/
Could not fetch URL https://pypi.org/simple/esbonio/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/esbonio/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement esbonio[lsp]
ERROR: No matching distribution found for esbonio[lsp]
The terminal process "C:\Users\...\Anaconda3\envs\name\python.exe '-m', 'pip', 'install', 'esbonio[lsp]'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

Manually opening a new terminal and letting the Python extension activate the environment first and then running pip install ... works fine though

Microsoft Windows [Version 10.0.17134.2026]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\Users\...>C:/Users/.../Anaconda3/Scripts/activate

(base) C:\Users\...>conda activate k8sdemo

(k8sdemo) C:\Users\...>pip install esbonio[lsp]
Collecting esbonio[lsp]
  Downloading esbonio-0.5.0-py3-none-any.whl (22 kB)
...
alcarney commented 3 years ago

It would appear that this is a Windows only issue.. I am unable to reproduce this on Linux....

alcarney commented 3 years ago

It would also seem that this is not limited to conda either....

WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/esbonio/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/esbonio/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/esbonio/
Could not fetch URL https://pypi.org/simple/esbonio/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/esbonio/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement esbonio>=0.6.0 (from versions: none)
ERROR: No matching distribution found for esbonio>=0.6.0
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
The terminal process "c:\....\.env\Scripts\python.exe '-m', 'pip', 'install', 'esbonio>=0.6.0'" terminated with exit code: 1.
alcarney commented 1 year ago

This will be made redundant by v1 of the language server + vscode extension

alcarney commented 1 year ago

See #609 for more details