microsoft / Spark-Hive-Tools

This is for issue/feedback tracking on Spark & Hive Tools
Creative Commons Attribution 4.0 International
6 stars 9 forks source link

Cannot activate extension using Miniconda #39

Open DaveGreasley opened 1 year ago

DaveGreasley commented 1 year ago

I am trying to install the extension to VSCode on Windows 10 using Miniconda as my source of Python. This is due to restrictions in my environment.

The extension has installed but when it tries to activate I get the following error:

Unable to determine version of Jupyter, Traceback (most recent call last):
  File "C:\Users\xxxxxxx\Miniconda3\envs\export_pipelines\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\xxxxxxx\Miniconda3\envs\export_pipelines\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\xxxxxxx\.msvscode.hdinsight\hdinsightJupyter\Scripts\jupyter-notebook.EXE\__main__.py", line 4, in <module>
  File "C:\Users\xxxxxxx\.msvscode.hdinsight\hdinsightJupyter\lib\site-packages\notebook\notebookapp.py", line 59, in <module>
    from tornado import httpserver
  File "C:\Users\xxxxxxx\.msvscode.hdinsight\hdinsightJupyter\lib\site-packages\tornado\httpserver.py", line 29, in <module>
    import ssl
  File "C:\Users\xxxxxxx\Miniconda3\envs\export_pipelines\lib\ssl.py", line 98, in <module>
    import _ssl             # if we can't import it, let the error propagate
ImportError: DLL load failed while importing _ssl: The specified module could not be found.

When I activate the hdinsightJupyter virtual environment in a command prompt I am able to import the ssl module without issue. To make this work I have added the following entries to my user's PATH variable:

However, the extension still gives the same error message. Its as if it is not accessing the environment variables correctly.

VS Code Version: 1.74.0 Spark & Hive Tools Extension Version: 1.1.19 Miniconda Version: 4.11.0 Python Version: 3.8.10