Skip to content

Pytest fails to use the correct conda environment path for testing #19069

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

Closed
1vecera opened this issue May 5, 2022 · 41 comments
Closed

Pytest fails to use the correct conda environment path for testing #19069

1vecera opened this issue May 5, 2022 · 41 comments
Assignees
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug triage-needed Needs assignment to the proper sub-team verified Verification succeeded
Milestone

Comments

@1vecera
Copy link

1vecera commented May 5, 2022

Issue Type: Bug

Pytest discover tests

I get error:
EnvironmentLocationNotFound: Not a conda environment: C:\Conda\envs\swp10\envs\swp10
because the true path is just;
C:\Conda\envs\swp10\


Experiment 'pythonaa' is active
Experiment 'pythonTensorboardExperiment' is active
Experiment 'PythonPyTorchProfiler' is active
Experiment 'pythonDeprecatePythonPath' is active
Experiment 'pythonInterpreterInfoPinned' is active
> conda info --json
> C:\Conda\envs\swp10\python.exe ~\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\interpreterInfo.py
> C:\Conda\python.exe ~\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\interpreterInfo.py
Python interpreter path: C:\Conda\envs\swp10\python.exe
> conda run -n swp10 --no-capture-output python ~\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2022.5.11221002/pythonFiles/printEnvVariables.py
> C:\Conda\envs\flights\python.exe ~\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\interpreterInfo.py
> C:\Conda\envs\handson\python.exe ~\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\interpreterInfo.py
> C:\Conda\envs\refining\python.exe ~\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\interpreterInfo.py
Starting Pylance language server.
> conda run -n swp10 --no-capture-output python ~\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2022.5.11221002/pythonFiles/printEnvVariables.py
> conda run -n swp10 --no-capture-output python ~\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\testing_tools\run_adapter.py discover pytest -- --rootdir . -s --cache-clear tests
cwd: .
[ERROR 2022-4-5 14:48:49.500]: Error discovering pytest tests:
 [n [Error]: 
EnvironmentLocationNotFound: Not a conda environment: C:\Conda\envs\swp10\envs\swp10

at ChildProcess.<anonymous> (c:\Users\Varo-local_User\.vscode\extensions\ms-python.python-2022.5.11221002\out\client\extension.js:2:228554)
at Object.onceWrapper (node:events:510:26)
at ChildProcess.emit (node:events:390:28)
at maybeClose (node:internal/child_process:1064:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)]

Steps to reproduce:

  1. Download this repo
  2. Open the test tab on VSCode

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.10.4
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Conda
  • Value of the python.languageServer setting: Pylance

languageServer: "Pylance"

linting
• enabled: true
• cwd: ""
• Flake8Args: ""
• flake8Enabled: false
• flake8Path: ""
• lintOnSave: true
• banditArgs: ""
• banditEnabled: false
• banditPath: ""
• mypyArgs: ""
• mypyEnabled: false
• mypyPath: ""
• pycodestyleArgs: ""
• pycodestyleEnabled: false
• pycodestylePath: ""
• prospectorArgs: ""
• prospectorEnabled: false
• prospectorPath: ""
• pydocstyleArgs: ""
• pydocstyleEnabled: false

• pylamaEnabled: false

formatting

• provider: "yapf"

testing
• cwd: ""
• debugPort: 3000
• nosetestArgs: ""
• nosetestsEnabled: undefined
• nosetestPath: ""
• promptToConfigure: true
• pytestArgs: ""
• pytestEnabled: true
• pytestPath: ""
• unittestArgs: ""
• unittestEnabled: false
• autoTestDiscoverOnSaveEnabled: true

terminal
• activateEnvironment: true

experiments
• enabled: true
• optInto: []
• optOutFrom: []


</p>
</details>


Extension version: 2022.5.11221002
VS Code version: Code 1.66.2 (dfd34e8260c270da74b5c2d86d61aee4b6d56977, 2022-04-11T07:46:01.075Z)
OS version: Windows_NT x64 10.0.17763
Restricted Mode: No

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Xeon(R) CPU E5-2697A v4 @ 2.60GHz (8 x 2600)|
|GPU Status|2d_canvas: unavailable_software<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: disabled_software<br>multiple_raster_threads: enabled_on<br>oop_rasterization: disabled_off<br>opengl: disabled_off<br>rasterization: disabled_software<br>raw_draw: disabled_off_ok<br>skia_renderer: enabled_on<br>video_decode: disabled_software<br>video_encode: disabled_software<br>vulkan: disabled_off<br>webgl: unavailable_software<br>webgl2: unavailable_software|
|Load (avg)|undefined|
|Memory (System)|64.00GB (48.15GB free)|
|Process Argv|D:\\DV\\VAROModule --crash-reporter-id 4258b87b-5f84-49f0-94bb-91ba84a55f17|
|Screen Reader|no|
|VM|100%|
</details><details>
<summary>A/B Experiments</summary>

vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
cppdebug:30475216


</details>

<!-- generated by issue reporter -->
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label May 5, 2022
@1vecera
Copy link
Author

1vecera commented May 5, 2022

@karthiknadig karthiknadig added bug Issue identified by VS Code Team member as probable bug area-environments Features relating to handling interpreter environments labels May 5, 2022
@karthiknadig karthiknadig assigned karrtikr and kimadeline and unassigned kimadeline May 5, 2022
@karrtikr karrtikr added investigating We are looking into the cause of the issue and removed triage-needed Needs assignment to the proper sub-team labels May 5, 2022
@karrtikr
Copy link

karrtikr commented May 5, 2022

Thanks for the detailed logs, meanwhile I reproduce it can you try running the command which failed in terminal and see what happens:

conda run -n swp10 --no-capture-output python ~\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\testing_tools\run_adapter.py discover pytest -- --rootdir . -s --cache-clear tests

Make sure to expand the ~ to your user directory.

Please check results in both VSCode terminal and an external terminal.

@karrtikr karrtikr added the info-needed Issue requires more information from poster label May 5, 2022
@1vecera
Copy link
Author

1vecera commented May 10, 2022

Powershell, my default shell, fails both within VSCode and externally.

(swp10) PS D:\DV\VAROModule> conda activate swp10
(swp10) PS D:\DV\VAROModule> Set-Location -path "D:\DV\VAROModule"
(swp10) PS D:\DV\VAROModule> conda run -n swp10 --no-capture-output python C:\Users\Varo-local_User\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\get_output_via_markers.py C:\Users\Varo-local_User\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\testing_tools\run_adapter.py discover pytest -- --rootdir . -s --cache-clear tests
>>>PYTHON-EXEC-OUTPUT
usage: C:\Users\Varo-local_User\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\testing_tools\run_adapter.py
       [-h] {discover} ...
C:\Users\Varo-local_User\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\testing_tools\run_adapter.py: error: unrecognized arguments: --rootdir . -s --cache-clear tests
<<<PYTHON-EXEC-OUTPUT
ERROR conda.cli.main_run:execute(41): `conda run python C:\Users\Varo-local_User\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\get_output_via_markers.py C:\Users\Varo-local_User\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\testing_tools\run_adapter.py discover pytest --rootdir . -s --cache-clear tests` failed. (See above for error)

Simple comand line without activation runs:

D:\DV\VAROModule>D:

D:\DV\VAROModule>cd D:\DV\VAROModule

D:\DV\VAROModule>conda run -n swp10 --no-capture-output python C:\Users\Varo-local_User\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\get_output_via_markers.py C:\Users\Varo-local_User\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\testing_tools\run_adapter.py discover pytest -- --rootdir . -s --cache-clear tests
>>>PYTHON-EXEC-OUTPUT
[{"rootid": ".", "root": "D:\\DV\\VAROModule", "parents": [{"id": "./tests", "kind": "folder", "name": "tests", "parentid": ".", "relpath": ".\\tests"}, {"id": "./tests/test_azureupload.py", "kind": "file", "name": "test_azureupload.py", "parentid": "./tests", "relpath": ".\\tests\\test_azureupload.py"}, {"id": "./tests/test_checkerrors.py", "kind": "file", "name": "test_checkerrors.py", "parentid": "./tests", "relpath": ".\\tests\\test_checkerrors.py"}, {"id": "./tests/test_email.py", "kind": "file", "name": "test_email.py", "parentid": "./tests", "relpath": ".\\tests\\test_email.py"}, {"id": "./tests/test_g_folder.py", "kind": "file", "name": "test_g_folder.py", "parentid": "./tests", "relpath": ".\\tests\\test_g_folder.py"}, {"id": "./tests/test_ice.py", "kind": "file", "name": "test_ice.py", "parentid": "./tests", "relpath": ".\\tests\\test_ice.py"}, {"id": "./tests/test_readExcel.py", "kind": "file", "name": "test_readExcel.py", "parentid": "./tests", "relpath": ".\\tests\\test_readExcel.py"}, {"id": "./tests/test_scheduler.py", "kind": "file", "name": "test_scheduler.py", "parentid": "./tests", "relpath": ".\\tests\\test_scheduler.py"}, {"id": "./tests/test_selenium.py", "kind": "file", "name": "test_selenium.py", "parentid": "./tests", "relpath": ".\\tests\\test_selenium.py"}, {"id": "./tests/test_upload_dashboard.py", "kind": "file", "name": "test_upload_dashboard.py", "parentid": "./tests", "relpath": ".\\tests\\test_upload_dashboard.py"}, {"id": "./tests/test_vrd.py", "kind": "file", "name": "test_vrd.py", "parentid": "./tests", "relpath": ".\\tests\\test_vrd.py"}, {"id": "./tests/test_x2.py", "kind": "file", "name": "test_x2.py", "parentid": "./tests", "relpath": ".\\tests\\test_x2.py"}], "tests": [{"id": "./tests/test_azureupload.py::test_upload_df", "name": "test_upload_df", "source": ".\\tests\\test_azureupload.py:5", "markers": [], "parentid": "./tests/test_azureupload.py"}, {"id": "./tests/test_checkerrors.py::test_assert_all_rows", "name": "test_assert_all_rows", "source": ".\\tests\\test_checkerrors.py:5", "markers": [], "parentid": "./tests/test_checkerrors.py"}, {"id": "./tests/test_email.py::test_email", "name": "test_email", "source": ".\\tests\\test_email.py:5", "markers": [], "parentid": "./tests/test_email.py"}, {"id": "./tests/test_g_folder.py::test_g_folder_path", "name": "test_g_folder_path", "source": ".\\tests\\test_g_folder.py:4", "markers": [], "parentid": "./tests/test_g_folder.py"}, {"id": "./tests/test_ice.py::test_dailySeries", "name": "test_dailySeries", "source": ".\\tests\\test_ice.py:15", "markers": [], "parentid": "./tests/test_ice.py"}, {"id": "./tests/test_ice.py::test_parsing", "name": "test_parsing", "source": ".\\tests\\test_ice.py:34", "markers": [], "parentid": "./tests/test_ice.py"}, {"id": "./tests/test_ice.py::test_minuteSeries", "name": "test_minuteSeries", "source": ".\\tests\\test_ice.py:42", "markers": [], "parentid": "./tests/test_ice.py"}, {"id": "./tests/test_ice.py::test_non_numeric", "name": "test_non_numeric", "source": ".\\tests\\test_ice.py:58", "markers": [], "parentid": "./tests/test_ice.py"}, {"id": "./tests/test_ice.py::test_TimeSales", "name": "test_TimeSales", "source": ".\\tests\\test_ice.py:73", "markers": [], "parentid": "./tests/test_ice.py"}, {"id": "./tests/test_readExcel.py::test_readTable", "name": "test_readTable", "source": ".\\tests\\test_readExcel.py:6", "markers": [], "parentid": "./tests/test_readExcel.py"}, {"id": "./tests/test_readExcel.py::test_readRange", "name": "test_readRange", "source": ".\\tests\\test_readExcel.py:10", "markers": [], "parentid": "./tests/test_readExcel.py"}, {"id": "./tests/test_scheduler.py::test_bat", "name": "test_bat", "source": ".\\tests\\test_scheduler.py:3", "markers": [], "parentid": "./tests/test_scheduler.py"}, {"id": "./tests/test_scheduler.py::test_Different_file", "name": "test_Different_file", "source": ".\\tests\\test_scheduler.py:6", "markers": [], "parentid": "./tests/test_scheduler.py"}, {"id": "./tests/test_scheduler.py::test_Different_folder", "name": "test_Different_folder", "source": ".\\tests\\test_scheduler.py:9", "markers": [], "parentid": "./tests/test_scheduler.py"}, {"id": "./tests/test_scheduler.py::test_create_action", "name": "test_create_action", "source": ".\\tests\\test_scheduler.py:13", "markers": [], "parentid": "./tests/test_scheduler.py"}, {"id": "./tests/test_scheduler.py::test_create_action_wrong", "name": "test_create_action_wrong", "source": ".\\tests\\test_scheduler.py:16", "markers": [], "parentid": "./tests/test_scheduler.py"}, {"id": "./tests/test_scheduler.py::test_send_info", "name": "test_send_info", "source": ".\\tests\\test_scheduler.py:23", "markers": [], "parentid": "./tests/test_scheduler.py"}, {"id": "./tests/test_selenium.py::test_webdriver", "name": "test_webdriver", "source": ".\\tests\\test_selenium.py:1", "markers": [], "parentid": "./tests/test_selenium.py"}, {"id": "./tests/test_upload_dashboard.py::test_upload_double_images", "name": "test_upload_double_images", "source": ".\\tests\\test_upload_dashboard.py:1", "markers": [], "parentid": "./tests/test_upload_dashboard.py"}, {"id": "./tests/test_vrd.py::test_get_vrd_daily_file", "name": "test_get_vrd_daily_file", "source": ".\\tests\\test_vrd.py:1", "markers": [], "parentid": "./tests/test_vrd.py"}, {"id": "./tests/test_x2.py::test_bulk_spot_download", "name": "test_bulk_spot_download", "source": ".\\tests\\test_x2.py:2", "markers": [], "parentid": "./tests/test_x2.py"}]}]

Opening command in VSCode runs a conda activate script and pytest seems to pick up the wrong environment (pre-3.9 so it results in a import errors)

C:\Users\Varo-local_User>C:/Conda/Scripts/activate

(base) C:\Users\Varo-local_User>conda activate swp10

(swp10) C:\Users\Varo-local_User>D:


(swp10) D:\>CD D:\DV\VAROModule

(swp10) D:\DV\VAROModule>conda run -n swp10 --no-capture-output python C:\Users\Varo-local_User\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\get_output_via_markers.py C:\Users\Varo-local_User\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\testing_tools\run_adapter.py discover pytest -- --rootdir . -s --cache-clear tests
>>>PYTHON-EXEC-OUTPUT
equivalent command: C:\Conda\python.exe -m pytest --collect-only --rootdir . -s --cache-clear tests
============================= test session starts =============================
platform win32 -- Python 3.7.4, pytest-5.3.5, py-1.8.1, pluggy-0.12.0
rootdir: D:\DV\VAROModule
plugins: arraydiff-0.3, doctestplus-0.4.0, openfiles-0.4.0, remotedata-0.3.1
collected 5 items / 6 errors
<Package D:\DV\VAROModule\tests>
  <Module test_email.py>
    <Function test_email>
  <Module test_selenium.py>
    <Function test_webdriver>
  <Module test_upload_dashboard.py>
    <Function test_upload_double_images>
  <Module test_vrd.py>
    <Function test_get_vrd_daily_file>
  <Module test_x2.py>
    <Function test_bulk_spot_download>

=================================== ERRORS ====================================
_________________ ERROR collecting tests/test_azureupload.py __________________
ImportError while importing test module 'D:\DV\VAROModule\tests\test_azureupload.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests\test_azureupload.py:3: in <module>
    from VARO.azurefunctions import AzureSession
VARO\__init__.py:7: in <module>
    from .azurefunctions import AzureSession
VARO\azurefunctions.py:17: in <module>
    from typing import Literal
E   ImportError: cannot import name 'Literal' from 'typing' (C:\Conda\lib\typing.py)
_________________ ERROR collecting tests/test_checkerrors.py __________________
ImportError while importing test module 'D:\DV\VAROModule\tests\test_checkerrors.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests\test_checkerrors.py:3: in <module>
    from VARO import assert_all_rows
VARO\__init__.py:7: in <module>
    from .azurefunctions import AzureSession
VARO\azurefunctions.py:17: in <module>
    from typing import Literal
E   ImportError: cannot import name 'Literal' from 'typing' (C:\Conda\lib\typing.py)
___________________ ERROR collecting tests/test_g_folder.py ___________________
ImportError while importing test module 'D:\DV\VAROModule\tests\test_g_folder.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests\test_g_folder.py:3: in <module>
    from VARO import get_g_folder_path
VARO\__init__.py:7: in <module>
    from .azurefunctions import AzureSession
VARO\azurefunctions.py:17: in <module>
    from typing import Literal
E   ImportError: cannot import name 'Literal' from 'typing' (C:\Conda\lib\typing.py)
_____________________ ERROR collecting tests/test_ice.py ______________________
ImportError while importing test module 'D:\DV\VAROModule\tests\test_ice.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests\test_ice.py:3: in <module>
    from VARO import ice_to_df
VARO\__init__.py:7: in <module>
    from .azurefunctions import AzureSession
VARO\azurefunctions.py:17: in <module>
    from typing import Literal
E   ImportError: cannot import name 'Literal' from 'typing' (C:\Conda\lib\typing.py)
__________________ ERROR collecting tests/test_readExcel.py ___________________
ImportError while importing test module 'D:\DV\VAROModule\tests\test_readExcel.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests\test_readExcel.py:4: in <module>
    from VARO.read_excel import read_ExcelTable
VARO\__init__.py:7: in <module>
    from .azurefunctions import AzureSession
VARO\azurefunctions.py:17: in <module>
    from typing import Literal
E   ImportError: cannot import name 'Literal' from 'typing' (C:\Conda\lib\typing.py)
__________________ ERROR collecting tests/test_scheduler.py ___________________
ImportError while importing test module 'D:\DV\VAROModule\tests\test_scheduler.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests\test_scheduler.py:1: in <module>
    from VARO.task_scheduler import create_action, create_bat_file,send_info_on_tasks
VARO\__init__.py:7: in <module>
    from .azurefunctions import AzureSession
VARO\azurefunctions.py:17: in <module>
    from typing import Literal
E   ImportError: cannot import name 'Literal' from 'typing' (C:\Conda\lib\typing.py)
============================== warnings summary ===============================
C:\Conda\lib\site-packages\pandas\_testing.py:24
  C:\Conda\lib\site-packages\pandas\_testing.py:24: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    import pandas._libs.testing as _testing

C:\Conda\lib\site-packages\requests\__init__.py:91
  C:\Conda\lib\site-packages\requests\__init__.py:91: RequestsDependencyWarning: urllib3 (1.26.7) or chardet (3.0.4) doesn't match a supported version!
    RequestsDependencyWarning)

-- Docs: https://docs.pytest.org/en/latest/warnings.html
!!!!!!!!!!!!!!!!!!! Interrupted: 6 errors during collection !!!!!!!!!!!!!!!!!!!
======================== 2 warnings, 6 errors in 6.12s ========================

<<<PYTHON-EXEC-OUTPUT
Traceback (most recent call last):
  File "C:\Users\Varo-local_User\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\get_output_via_markers.py", line 26, in <module>
    runpy.run_path(module, run_name="__main__")
  File "C:\Conda\lib\runpy.py", line 263, in run_path
    pkg_name=pkg_name, script_name=fname)
  File "C:\Conda\lib\runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "C:\Conda\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Varo-local_User\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\testing_tools\run_adapter.py", line 22, in <module>
    main(tool, cmd, subargs, toolargs)
  File "C:\Users\Varo-local_User\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\testing_tools\adapter\__main__.py", line 100, in main
    parents, result = run(toolargs, **subargs)
  File "C:\Users\Varo-local_User\.vscode\extensions\ms-python.python-2022.5.11221002\pythonFiles\testing_tools\adapter\pytest\_discovery.py", line 44, in discover
    raise Exception("pytest discovery failed (exit code {})".format(ec))
Exception: pytest discovery failed (exit code 2)


@karrtikr karrtikr removed the info-needed Issue requires more information from poster label May 10, 2022
@karrtikr
Copy link

Thank you for the details. It seems you likely launched VSCode from an activated terminal?

There is an issue with conda run when running it from a terminal that already has an activated environment (conda/conda#11305, conda/conda#11174), so this seems to be a dup of that.

@karrtikr karrtikr added the info-needed Issue requires more information from poster label May 24, 2022
@1vecera
Copy link
Author

1vecera commented May 25, 2022

@karrtikr I've launched using right-click open with code and selecting the environment, should I test it with opening PowerShell, activating my env. and launching using code . command?

@karrtikr karrtikr removed the info-needed Issue requires more information from poster label May 25, 2022
@1vecera
Copy link
Author

1vecera commented Jun 10, 2022

Anything I can do?

@karrtikr
Copy link

karrtikr commented Jun 10, 2022

Apologies for the delayed reply. Summarizing the discussion:

Opening command in VSCode runs a conda activate script and pytest seems to pick up the wrong environment (pre-3.9 so it results in a import errors)

This is due to the bug mentioned in #19069 (comment).

Powershell, my default shell, fails both within VSCode and externally.

This is also due to bug mentioned above, where running conda run on top of conda activate uses the base conda python instead.

Simple comand line without activation runs:

I assume you're referring to Command prompt.

The case I would like you to test:

Some more information I need for the VSCode terminal where conda activate command is not set:

  • Value of ComSpec environment variable. Start a new CMD session and run set ComSpec.
  • Value of VIRTUAL_ENV variable.
  • Value of CONDA_SHLVL variable

Thanks :)

@karrtikr karrtikr added the info-needed Issue requires more information from poster label Jun 10, 2022
@karrtikr karrtikr added triage-needed Needs assignment to the proper sub-team and removed investigating We are looking into the cause of the issue labels Jul 8, 2022
@aaravind100
Copy link

I have this same problem, but in wsl. The conda environment name is dev162 located at "/home/aravia1/miniconda3/envs/dev162/" but it is looking for the environment at "/home/aravia1/miniconda3/envs/dev162/envs/dev162" and fails.

Experiment 'pythonaacf' is active
LSP Notebooks experiment is enabled
LSP Notebooks interactive window support is enabled
Python interpreter path: ~/miniconda3/envs/dev162/bin/python
Starting Pylance language server.
> conda info --json
> conda run -n dev162 --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2022.12.1/pythonFiles/printEnvVariables.py
> conda run -n dev162 --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2022.12.1/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir . -s --cache-clear tests
cwd: .
[ERROR 2022-7-24 11:58:52.839]: Error discovering pytest tests:
 [n [Error]: 
EnvironmentLocationNotFound: Not a conda environment: /home/aravia1/miniconda3/envs/dev162/envs/dev162


	at ChildProcess.<anonymous> (/home/aravia1/.vscode-server/extensions/ms-python.python-2022.12.1/out/client/extension.js:2:238622)
	at Object.onceWrapper (node:events:510:26)
	at ChildProcess.emit (node:events:390:28)
	at maybeClose (node:internal/child_process:1064:16)
	at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)]
> conda info --json

As weird as it sounds, i just tried creating a symlink at the path "/home/aravia1/miniconda3/envs/dev162/envs/dev162" and the tests gets discovered 🤷.

Symlink:

ln -s ~/miniconda3/envs/dev162/ ~/miniconda3/envs/dev162/envs/dev162

Successful test discovery:

> conda run -n dev162 --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2022.12.1/pythonFiles/printEnvVariables.py
> conda run -n dev162 --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2022.12.1/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir . -s --cache-clear tests
cwd: .

@akzaidi
Copy link

akzaidi commented Aug 31, 2022

Hello! Unfortunately, I'm having the same issue in a few workspaces. It is occurring in macOS as well as ubuntu 20.04 with code-insiders and python extension v2022.12.1. Also happens when using the remote-SSH extension, but it's not exclusive to that scenario. Can be tested with this repository.

Python extension output:

Experiment 'pythonaa' is active
LSP Notebooks experiment is enabled
LSP Notebooks interactive window support is enabled
> conda info --json
> /usr/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /usr/include/python3.6 ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /usr/include/python3.7 ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
[ERROR 2022-7-31 2:27:34.462]: [Error: Command failed: /usr/include/python3.6 /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
/bin/sh: 1: /usr/include/python3.6: Permission denied

	at ChildProcess.exithandler (node:child_process:399:12)
	at ChildProcess.emit (node:events:526:28)
	at maybeClose (node:internal/child_process:1092:16)
	at Socket.<anonymous> (node:internal/child_process:451:11)
	at Socket.emit (node:events:526:28)
	at Pipe.<anonymous> (node:net:687:12)] {
  killed: false,
  code: 126,
  signal: null,
  cmd: '/usr/include/python3.6 /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py'
}
[ERROR 2022-7-31 2:27:34.467]: [Error: Command failed: /usr/include/python3.7 /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
/bin/sh: 1: /usr/include/python3.7: Permission denied

	at ChildProcess.exithandler (node:child_process:399:12)
	at ChildProcess.emit (node:events:526:28)
	at maybeClose (node:internal/child_process:1092:16)
	at Socket.<anonymous> (node:internal/child_process:451:11)
	at Socket.emit (node:events:526:28)
	at Pipe.<anonymous> (node:net:687:12)] {
  killed: false,
  code: 126,
  signal: null,
  cmd: '/usr/include/python3.7 /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py'
}
> /anaconda/envs/aisc/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/alae/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/archai/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/ddm/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
Python interpreter path: /anaconda/envs/ddm/bin/python
> conda run -n ddm --no-capture-output python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/printEnvVariables.py
> /anaconda/envs/audio/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/audiotf2/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/azureml_py36_automl/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/azureml_py36_pytorch/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/azureml_py36_tensorflow/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/bonsai/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/bonsai-batch/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/bonsai-preview/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/bonsai-scg-latest/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/brain/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/cleanrl/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/clip-dalle/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/clip-featureviz/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/coinbot/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/colab/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/d3rl/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/dalle/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/data2sim/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/ddm3/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/dmcontrol/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/dvc/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/hfcourse/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/iglu/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/jpylb/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/jupy/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/mineiglurl/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/minerl/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/modelcard/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/nlu/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/parsing/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/py37_default/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/py37_pytorch/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/py37_tensorflow/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/ray/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/repsol/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/rl/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/rlex/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/rlydoe/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/sbi/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/timeformers/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /anaconda/envs/torch/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
> /bin/bash ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
[ERROR 2022-7-31 2:27:46.530]: Error: Command failed: /bin/bash /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py
/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py: line 4: import: command not found
/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py: line 5: import: command not found
/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py: line 10: syntax error near unexpected token `">>>PYTHON-EXEC-OUTPUT"'
/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py: line 10: `print(">>>PYTHON-EXEC-OUTPUT")'

    at ChildProcess.exithandler (node:child_process:399:12)
    at ChildProcess.emit (node:events:526:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) {
  killed: false,
  code: 2,
  signal: null,
  cmd: '/bin/bash /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/interpreterInfo.py'
}
Starting Pylance language server.
> conda run -n ddm --no-capture-output python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/printEnvVariables.py
> conda run -n ddm --no-capture-output python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir . -s --cache-clear tests
cwd: .
[ERROR 2022-7-31 2:28:4.244]: Error discovering pytest tests:
 n [Error]: 
EnvironmentLocationNotFound: Not a conda environment: /anaconda/envs/ddm/envs/ddm


    at ChildProcess.<anonymous> (/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/out/client/extension.js:2:238622)
    at Object.onceWrapper (node:events:646:26)
    at ChildProcess.emit (node:events:526:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Socket.<anonymous> (node:internal/child_process:451:11)
    at Socket.emit (node:events:526:28)
    at Pipe.<anonymous> (node:net:687:12)
Jupyter provided interpreter path override: /anaconda/envs/ddm/bin/python

Additional environment Info:

Version: 1.71.0-insider
Commit: 7ed02a69658fc07f08740b98fa0d8d96c1a61ed4
Date: 2022-08-24T05:18:46.886Z (6 days ago)
Electron: 19.0.12
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Darwin x64 21.6.0
Sandboxed: Yes

Note that directly running the command conda run -n ddm --no-capture-output python ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.12.1/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir . -s --cache-clear tests in my active terminal works fine, and that terminal has already activated my virtual environment. Is there a step where it's appending the virtual environment name and parent directory to the activated pytest test?

Thanks in advance for help!

@karrtikr karrtikr removed the info-needed Issue requires more information from poster label Aug 31, 2022
@karrtikr
Copy link

Hey @akzaidi, can you help me with the information asked here #19421 (comment)?

I suspect it's caused due to conda itself, and they made some recent fixes in their canary build, can you checkout the conda canary build and see if it helps?

conda update -c conda-canary/label/dev conda

@karrtikr karrtikr added the info-needed Issue requires more information from poster label Aug 31, 2022
@dorukhansergin
Copy link

Hey @akzaidi, can you help me with the information asked here #19421 (comment)?

I suspect it's caused due to conda itself, and they made some recent fixes in their canary build, can you checkout the conda canary build and see if it helps?

conda update -c conda-canary/label/dev conda

I'm having the same issue. Just tried this and had conda updated to 4.14.0-py38h10201cd_0, but getting the same error.

This is a Macbook Pro M1 , VSCode version 1.70.

@karrtikr
Copy link

karrtikr commented Sep 2, 2022

echo $ComSpec; echo $VIRTUAL_ENV; echo $CONDA_SHLVL
     3

Where did 3 come from?

@akzaidi
Copy link

akzaidi commented Sep 2, 2022

@karrtikr here's a screenshot of running conda run for the tests in the integrated terminal (where the conda env is already activated):
image

I am seeing this exception after the tests:

Traceback (most recent call last):
  File "/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py", line 26, in <module>
    runpy.run_path(module, run_name="__main__")
  File "/anaconda/envs/ddm/lib/python3.7/runpy.py", line 263, in run_path
    pkg_name=pkg_name, script_name=fname)
  File "/anaconda/envs/ddm/lib/python3.7/runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "/anaconda/envs/ddm/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/testing_tools/run_adapter.py", line 22, in <module>
    main(tool, cmd, subargs, toolargs)
  File "/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/testing_tools/adapter/__main__.py", line 99, in main
    parents, result = run(toolargs, **subargs)
  File "/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/testing_tools/adapter/pytest/_discovery.py", line 44, in discover
    raise Exception("pytest discovery failed (exit code {})".format(ec))
Exception: pytest discovery failed (exit code 2)
ERROR conda.cli.main_run:execute(49): `conda run python /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py /home/alizaidi/.v

The same behavior occurs from running conda run after deactivating the environment first:

❯ conda deactivate

alizaidi in azdevrl in datadrivenmodel on  alizaidi/lag_improvements [?] via 🐍 v3.7.6 via 📐 v3.6.3 
❯ conda run -n ddm --no-capture-output python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir ~/bonsai/datadrivenmodel -s --cache-clear tests
>>>PYTHON-EXEC-OUTPUT
equivalent command: /anaconda/envs/ddm/bin/python -m pytest --collect-only --rootdir /home/alizaidi/bonsai/datadrivenmodel -s --cache-clear tests
============================= test session starts ==============================
platform linux -- Python 3.7.7, pytest-7.1.2, pluggy-0.13.1
rootdir: /home/alizaidi/bonsai/datadrivenmodel
plugins: anyio-3.4.0, clarity-1.0.1, hydra-core-1.0.5
collected 30 items / 1 error

<Package tests>
  <Module test_dataclass.py>
    <Function test_cartpole_at_st1>
    <Function test_cartpole_at_st>
    <Function test_diff_labels_1>
    <Function test_diff_labels_2>
    <Function test_concatenate_states_1>
    <Function test_concatenate_states_2>
    <Function test_concatenate_states_3>
  <Module test_gboost.py>
    <Function test_shape>
    <Function test_lgm_train>
    <Function test_xgb_train>
  <Module test_gboost_diff.py>
    <Function test_shape>
    <Function test_lgm_train>
    <Function test_xgb_train>
  <Module test_loaders.py>
    <Function test_cartpole_at_st1>
    <Function test_cartpole_at_st>
    <Function test_base_reader>
    <Function test_diff_names>
  <Module test_pytorch_model.py>
    <Function test_shape>
    <Function test_build>
    <Function test_fit>
    <Function test_sweep>
    <Function test_predictor>
    <Function test_save_model>
  <Module test_sklearn.py>
    <Function test_shape>
    <Function test_svm_train>
    <Function test_linear_train>
    <Function test_gbr_train>
  <Module test_sweeping.py>
    <Function test_sweeping_lightgbm>
    <Function test_sweeping_svr>
    <Function test_sweeping_xgboost>

==================================== ERRORS ====================================
_________________ ERROR collecting tests/test_gboost_concat.py _________________
/anaconda/envs/ddm/lib/python3.7/site-packages/pandas/core/indexes/base.py:3361: in get_loc
    return self._engine.get_loc(casted_key)
pandas/_libs/index.pyx:76: in pandas._libs.index.IndexEngine.get_loc
    ???
pandas/_libs/index.pyx:108: in pandas._libs.index.IndexEngine.get_loc
    ???
pandas/_libs/hashtable_class_helper.pxi:5198: in pandas._libs.hashtable.PyObjectHashTable.get_item
    ???
pandas/_libs/hashtable_class_helper.pxi:5206: in pandas._libs.hashtable.PyObjectHashTable.get_item
    ???
E   KeyError: 'prev_state_x_position_1'

The above exception was the direct cause of the following exception:
tests/test_gboost_concat.py:17: in <module>
    concatenated_zero_padding=True,
base.py:243: in load_csv
    concatenate_var_length=concatenate_var_length,
dataclass.py:376: in load_csv
    aux_df = self.df_concatenate_inputs(df)
dataclass.py:875: in df_concatenate_inputs
    feat_array = df[feat].values
/anaconda/envs/ddm/lib/python3.7/site-packages/pandas/core/frame.py:3458: in __getitem__
    indexer = self.columns.get_loc(key)
/anaconda/envs/ddm/lib/python3.7/site-packages/pandas/core/indexes/base.py:3363: in get_loc
    raise KeyError(key) from err
E   KeyError: 'prev_state_x_position_1'
=============================== warnings summary ===============================
../../../../anaconda/envs/ddm/lib/python3.7/site-packages/pkg_resources/__init__.py:1131
  /anaconda/envs/ddm/lib/python3.7/site-packages/pkg_resources/__init__.py:1131: DeprecationWarning: Use of .. or absolute path in a resource path is not allowed and will raise exceptions in a future release.
    self, resource_name

../../../../anaconda/envs/ddm/lib/python3.7/site-packages/mlflow/types/schema.py:49
  /anaconda/envs/ddm/lib/python3.7/site-packages/mlflow/types/schema.py:49: DeprecationWarning: `np.object` is a deprecated alias for the builtin `object`. To silence this warning, use `object` by itself. Doing this will not modify any behavior and is safe. 
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    binary = (7, np.dtype("bytes"), "BinaryType", np.object)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
ERROR tests/test_gboost_concat.py - KeyError: 'prev_state_x_position_1'
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
===================== 30 tests collected, 1 error in 3.34s =====================

<<<PYTHON-EXEC-OUTPUT
Traceback (most recent call last):
  File "/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py", line 26, in <module>
    runpy.run_path(module, run_name="__main__")
  File "/anaconda/envs/ddm/lib/python3.7/runpy.py", line 263, in run_path
    pkg_name=pkg_name, script_name=fname)
  File "/anaconda/envs/ddm/lib/python3.7/runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "/anaconda/envs/ddm/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/testing_tools/run_adapter.py", line 22, in <module>
    main(tool, cmd, subargs, toolargs)
  File "/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/testing_tools/adapter/__main__.py", line 99, in main
    parents, result = run(toolargs, **subargs)
  File "/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/testing_tools/adapter/pytest/_discovery.py", line 44, in discover
    raise Exception("pytest discovery failed (exit code {})".format(ec))
Exception: pytest discovery failed (exit code 2)
ERROR conda.cli.main_run:execute(49): `conda run python /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir /home/alizaidi/bonsai/datadrivenmodel -s --cache-clear tests` failed. (See above for error)

@akzaidi
Copy link

akzaidi commented Sep 2, 2022

```bash
 ❯ echo $ComSpec; echo $VIRTUAL_ENV; echo $CONDA_SHLVL
 3

Where did 3 come from?

hmm that is coming from CONDA_SHLVL...

@karrtikr
Copy link

karrtikr commented Sep 2, 2022

hmm that is coming from CONDA_SHLVL...

Well that suggests that the conda environment has not been deactivated successfully, before running the conda run command. Try the first approach mentioned in #19069 (comment) to get a deactivated terminal, and then attempt to run the command. The value of CONDA_SHLVL should be 0 if the terminal is deactivated.

I'm expecting to see the same error: EnvironmentLocationNotFound: Not a conda environment: /anaconda/envs/ddm/envs/ddm in the terminal, after which we can raise this bug with conda.

Thanks for all the help!

@karrtikr
Copy link

karrtikr commented Sep 2, 2022

@akzaidi I tried with codespaces but I'm successfully able to discover the tests:

image

All I did was create 16 core machine, run:

conda env update -f environment.yml
conda init --all
<close shell and reopen>
conda activate ddm

then created an .env file with:

PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python

image

reload the window and tests were discovered.

@akzaidi
Copy link

akzaidi commented Sep 2, 2022


then created an .env file with:

PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python

aha, I was also able to get tests discovered on codespaces when creating the .env file with the PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION variable. Why is this necessary?

Unfortunately, I'm still hitting the same error locally. I added the "python.terminal.activateEnvironment": false to my settings file and then had to deactivate conda twice in order to set $CONDA_SHLVL to zero. Running conda run after that did work, but tests still were not discovered by the extension.

image

@karrtikr
Copy link

karrtikr commented Sep 2, 2022

and then had to deactivate conda twice in order to set $CONDA_SHLVL to zero.

Interesting, so it would seem the environment is already activated in the bash terminal (You've probably have set .bashrc or .bashprofile which does this, or some User setting in VSCode). Let's skip this step. I think $CONDA_SHLVL would be 2. Just open a new terminal and then attempt to run the conda run command.

Note we're trying to replicate the same error in terminal under the same conditions, so that we can take the Python extension out of the picture and only focus on the command. Python extension internally simply launches the /bin/sh terminal and runs the conda run command.

Please also send me your User settings.

@karrtikr

This comment was marked as off-topic.

@akzaidi
Copy link

akzaidi commented Sep 3, 2022

hmm, sometimes the env variable is set to 3 instead of 2... Not sure what to make of that.

In a new terminal running conda run:

alizaidi in azdevrl in datadrivenmodel on  alizaidi/lag_improvements [?] via 🐍 v3.7.4 via 📐 v3.6.3 
❯ conda activate ddm

alizaidi in azdevrl in datadrivenmodel on  alizaidi/lag_improvements [?] via 🐍 v3.7.7 via 📐 v3.6.3 via 🅒 ddm 
❯ echo $CONDA_SHLVL
3

alizaidi in azdevrl in datadrivenmodel on  alizaidi/lag_improvements [?] via 🐍 v3.7.7 via 📐 v3.6.3 via 🅒 ddm 
❯ conda run -n ddm --no-capture-output python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir ~/bonsai/datadrivenmodel -s --cache-clear tests
>>>PYTHON-EXEC-OUTPUT
equivalent command: /anaconda/envs/ddm/bin/python -m pytest --collect-only --rootdir /home/alizaidi/bonsai/datadrivenmodel -s --cache-clear tests
============================= test session starts ==============================
platform linux -- Python 3.7.7, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/alizaidi/bonsai/datadrivenmodel
plugins: anyio-3.4.0, clarity-1.0.1, hydra-core-1.0.5
collected 30 items / 1 error

<Package tests>
  <Module test_dataclass.py>
    <Function test_cartpole_at_st1>
    <Function test_cartpole_at_st>
    <Function test_diff_labels_1>
    <Function test_diff_labels_2>
    <Function test_concatenate_states_1>
    <Function test_concatenate_states_2>
    <Function test_concatenate_states_3>
  <Module test_gboost.py>
    <Function test_shape>
    <Function test_lgm_train>
    <Function test_xgb_train>
  <Module test_gboost_diff.py>
    <Function test_shape>
    <Function test_lgm_train>
    <Function test_xgb_train>
  <Module test_loaders.py>
    <Function test_cartpole_at_st1>
    <Function test_cartpole_at_st>
    <Function test_base_reader>
    <Function test_diff_names>
  <Module test_pytorch_model.py>
    <Function test_shape>
    <Function test_build>
    <Function test_fit>
    <Function test_sweep>
    <Function test_predictor>
    <Function test_save_model>
  <Module test_sklearn.py>
    <Function test_shape>
    <Function test_svm_train>
    <Function test_linear_train>
    <Function test_gbr_train>
  <Module test_sweeping.py>
    <Function test_sweeping_lightgbm>
    <Function test_sweeping_svr>
    <Function test_sweeping_xgboost>

==================================== ERRORS ====================================
_________________ ERROR collecting tests/test_gboost_concat.py _________________
/anaconda/envs/ddm/lib/python3.7/site-packages/pandas/core/indexes/base.py:3361: in get_loc
    return self._engine.get_loc(casted_key)
pandas/_libs/index.pyx:76: in pandas._libs.index.IndexEngine.get_loc
    ???
pandas/_libs/index.pyx:108: in pandas._libs.index.IndexEngine.get_loc
    ???
pandas/_libs/hashtable_class_helper.pxi:5198: in pandas._libs.hashtable.PyObjectHashTable.get_item
    ???
pandas/_libs/hashtable_class_helper.pxi:5206: in pandas._libs.hashtable.PyObjectHashTable.get_item
    ???
E   KeyError: 'prev_state_x_position_1'

The above exception was the direct cause of the following exception:
tests/test_gboost_concat.py:17: in <module>
    concatenated_zero_padding=True,
base.py:243: in load_csv
    concatenate_var_length=concatenate_var_length,
dataclass.py:376: in load_csv
    aux_df = self.df_concatenate_inputs(df)
dataclass.py:875: in df_concatenate_inputs
    feat_array = df[feat].values
/anaconda/envs/ddm/lib/python3.7/site-packages/pandas/core/frame.py:3458: in __getitem__
    indexer = self.columns.get_loc(key)
/anaconda/envs/ddm/lib/python3.7/site-packages/pandas/core/indexes/base.py:3363: in get_loc
    raise KeyError(key) from err
E   KeyError: 'prev_state_x_position_1'
=============================== warnings summary ===============================
../../../../anaconda/envs/ddm/lib/python3.7/site-packages/pkg_resources/__init__.py:1131
  /anaconda/envs/ddm/lib/python3.7/site-packages/pkg_resources/__init__.py:1131: DeprecationWarning: Use of .. or absolute path in a resource path is not allowed and will raise exceptions in a future release.
    self, resource_name

../../../../anaconda/envs/ddm/lib/python3.7/site-packages/mlflow/types/schema.py:49
  /anaconda/envs/ddm/lib/python3.7/site-packages/mlflow/types/schema.py:49: DeprecationWarning: `np.object` is a deprecated alias for the builtin `object`. To silence this warning, use `object` by itself. Doing this will not modify any behavior and is safe. 
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    binary = (7, np.dtype("bytes"), "BinaryType", np.object)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
ERROR tests/test_gboost_concat.py - KeyError: 'prev_state_x_position_1'
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
===================== 30 tests collected, 1 error in 3.32s =====================

<<<PYTHON-EXEC-OUTPUT
Traceback (most recent call last):
  File "/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py", line 26, in <module>
    runpy.run_path(module, run_name="__main__")
  File "/anaconda/envs/ddm/lib/python3.7/runpy.py", line 263, in run_path
    pkg_name=pkg_name, script_name=fname)
  File "/anaconda/envs/ddm/lib/python3.7/runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "/anaconda/envs/ddm/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/testing_tools/run_adapter.py", line 22, in <module>
    main(tool, cmd, subargs, toolargs)
  File "/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/testing_tools/adapter/__main__.py", line 99, in main
    parents, result = run(toolargs, **subargs)
  File "/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/testing_tools/adapter/pytest/_discovery.py", line 44, in discover
    raise Exception("pytest discovery failed (exit code {})".format(ec))
Exception: pytest discovery failed (exit code 2)
ERROR conda.cli.main_run:execute(49): `conda run python /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir /home/alizaidi/bonsai/datadrivenmodel -s --cache-clear tests` failed. (See above for error)

My user settings:

{
    "tabnine.experimentalAutoImports": true,
    "editor.insertSpaces": true,
    "editor.tabSize": 4,
    "editor.cursorStyle": "line",
    "editor.lineNumbers": "on",
    "workbench.editorAssociations": {
        "*.ipynb": "jupyter-notebook"
    },
    "workbench.panel.defaultLocation": "right",
    "markdownlint.customRules": [
        "{docsmsft.docs-linting}/markdownlint-custom-rules/rules.js"
    ],
    "markdownlint.config": {
        "MD028": false,
        "MD025": {
            "front_matter_title": ""
        }
    },
    "workbench.colorTheme": "Pitch Black",
    // "todo-tree.general.tags": [
    //     "BUG",
    //     "HACK",
    //     "FIXME",
    //     "TODO",
    //     "XXX",
    //     "[ ]",
    //     // "[x]"
    // ],
    "todo-tree.regex.regex": "(//|#|<!--|;|/\\*|^|^\\s*(-|\\d+.))\\s*($TAGS)",
    "yaml.schemas": {
        "file:///toc.schema.json": "/toc\\.yml/i"
    },
    // "git.autofetch": true
    "editor.wordWrap": "on",
    "vim.useSystemClipboard": true,
    "vim.hlsearch": true,
    "vim.insertModeKeyBindings": [
        {
            "before": [
                "j",
                "j"
            ],
            "after": [
                "<Esc>"
            ]
        }
    ],
    "vim.handleKeys": {
        "<C-w>": false,
        "<C-k>": false,
        "<C-a>": false,
        "<C-f>": false,
        "<C-b>": false,
        "<C-n>": false,
    },
    "vim.visualstar": true,
    "editor.minimap.enabled": true,
    "editor.rulers": [
        80,
        120
    ],
    "explorer.openEditors.visible": 10,
    "autoDocstring.docstringFormat": "numpy",
    "[markdown]": {
        "editor.quickSuggestions": {
            "comments": "on",
            "strings": "on",
            "other": "on"
        },
        "editor.defaultFormatter": "yzhang.markdown-all-in-one",
        "editor.tabSize": 2
    },
    "git.autofetch": true,
    "workbench.editor.showTabs": true,
    "breadcrumbs.symbolPath": "on",
    "gitlens.keymap": "chorded",
    "gitlens.views.fileHistory.enabled": true,
    "files.eol": "\n",
    "editor.fontLigatures": true,
    "editor.fontFamily": "Fira Code",
    "editor.suggestSelection": "first",
    "files.associations": {
        "*.rmd": "markdown"
    },
    "editor.quickSuggestions": {
        "strings": true,
        "comments": true,
        "other": true
    },
    "tabnine.disable_file_regex": [
        "[.]md$",
        "[.]Rmd$"
    ],
    // "tabnine.disable_file_regex": ["[.]md$", "[.]Rmd$"],
    "clock.alignment": "Right",
    "clock.format": "dddd, mmmm dd, HH:MM:ss",
    "explorer.confirmDragAndDrop": false,
    "markdown.preview.breaks": true,
    "git.confirmSync": false,
    "workbench.tree.indent": 18,
    "markdown-preview-enhanced.frontMatterRenderingOption": "table",
    "workbench.colorCustomizations": {
        "statusBar.background": "#1b1b1b",
        "statusBar.foreground": "#db68a2",
        "statusBar.debuggingBackground": "#1d043d",
        "statusBar.debuggingForeground": "#d4d490",
        "editorLineNumber.activeForeground": "#494747",
        "editorLineNumber.foreground": "#818181",
        "activityBarBadge.background": "#388E3C",
        "list.activeSelectionForeground": "#388E3C",
        "list.inactiveSelectionForeground": "#388E3C",
        "list.highlightForeground": "#388E3C",
        "scrollbarSlider.activeBackground": "#388E3C50",
        "editorSuggestWidget.highlightForeground": "#388E3C",
        "textLink.foreground": "#388E3C",
        "progressBar.background": "#388E3C",
        "pickerGroup.foreground": "#388E3C",
        "tab.activeBorder": "#388E3C",
        "notificationLink.foreground": "#388E3C",
        "editorWidget.resizeBorder": "#388E3C",
        "editorWidget.border": "#388E3C",
        "settings.modifiedItemIndicator": "#388E3C",
        "settings.headerForeground": "#388E3C",
        "panelTitle.activeBorder": "#388E3C",
        "breadcrumb.activeSelectionForeground": "#388E3C",
        "menu.selectionForeground": "#388E3C",
        "menubar.selectionForeground": "#388E3C",
        "editor.findMatchBorder": "#388E3C",
        "selection.background": "#388E3C40"
    },
    "markdown.preview.fontFamily": "Fira Code",
    "markdown.preview.fontSize": 13,
    "editor.tokenColorCustomizations": {
        "comments": "#7a7a7a",
        "textMateRules": [
            {
                "scope": "string.quoted.docstring.multi.python",
                "settings": {
                    "foreground": "#fcba03" //change to your preference
                }
            }
        ]
    },
    "plantuml.server": "https://www.plantuml.com/plantuml",
    "workbench.statusBar.visible": true,
    "workbench.activityBar.visible": true,
    "sync.gist": "20ccc1e6baab85027bc6f5c23e813644",
    "terminal.integrated.inheritEnv": true,
    "diffEditor.ignoreTrimWhitespace": false,
    "markdown-preview-enhanced.enableExtendedTableSyntax": true,
    "markdown-preview-enhanced.enableScriptExecution": true,
    "markdown-preview-enhanced.enableTypographer": true,
    "terminal.integrated.showExitAlert": false,
    "todo-tree.tree.showScanModeButton": false,
    "todo-tree.general.tagGroups": {
        "DEBUG": [
            "BUG",
            "DEBUG",
            "BUGGY",
        ],
        "FIXME": [
            "FIXME",
            "FIX"
        ],
        "REVIEW": [
            "REVIEW",
            "OPTIMIZE",
            "UGLY"
        ]
    },
    "todo-tree.general.tags": [
        "BUG",
        "DEBUG",
        "END REGION",
        "FIX",
        "FIXME",
        "HACK",
        "IDEA",
        "NOTE",
        "OPTIMIZE",
        "REGION",
        "REVIEW",
        "TODO",
        "UGLY",
        "[ ]"
        // "[x]"
    ],
    // Icon names from https://primer.style/octicons/
    "todo-tree.highlights.customHighlight": {
        "DEBUG": {
            "icon": "bug",
            "iconColour": "#cc0000" // Red
        },
        "END REGION": {
            "icon": "fold-up",
            "iconColour": "#006600", // Green
            "hideFromTree": true, // Regions don't need to be included in the tree
        },
        "FIXME": {
            "icon": "flame",
            "iconColour": "#ff8000" // Orange
        },
        "HACK": {
            "icon": "zap", // Alternates: squirrel, cpu
            "iconColour": "#9933FF" // Purple
        },
        "IDEA": {
            "icon": "light-bulb",
            "iconColour": "#bbbb22" // Yellow
        },
        "NOTE": {
            "icon": "pencil",
            "iconColour": "#ff00ff", // Indego
            "hideFromTree": true, // Notes don't need to be included in the tree
            "gutterIcon": false // No need to see note comments in the gutter
        },
        "REGION": {
            "icon": "fold-down",
            "iconColour": "#006600", // Green
            "hideFromTree": true, // Regions don't need to be included in the tree
        },
        "REVIEW": {
            "icon": "eye",
            "iconColour": "#00ccff" // Aqua
        },
        "TODO": {
            "icon": "check-circle",
            "iconColour": "#009900", // Green
        },
    },
    "remote.extensionKind": {
        "ms-azuretools.vscode-docker": "workspace"
    },
    // "python.dataScience.changeDirOnImportExport": true,
    // "python.dataScience.notebookFileRoot": "${fileDirname)",
    // "python.condaPath": "/anaconda/condabin/conda",
    // "python.analysis.downloadChannel": "daily",
    // "python.jediEnabled": false,
    "latex-workshop.view.pdf.viewer": "tab",
    "editor.largeFileOptimizations": false,
    "markdown.extension.tableFormatter.normalizeIndentation": true,
    "spellright.addToSystemDictionary": true,
    "r.sessionWatcher": true,
    "julia.enableTelemetry": true,
    "sync.autoDownload": true,
    "sync.autoUpload": true,
    "sync.removeExtensions": false,
    "sync.syncExtensions": true,
    // "tabnine.experimentalAutoImports": true,
    // "r.lsp.path": "/usr/local/bin/R",
    "r.rterm.mac": "/Users/alizaidi-msft/miniconda3/bin/radian",
    "r.rpath.mac": "/usr/local/bin/R",
    "r.alwaysUseActiveTerminal": true,
    "r.bracketedPaste": true,
    "markdown-preview-enhanced.scrollSync": true,
    "python.analysis.diagnosticMode": "workspace",
    "python.showStartPage": false,
    "python.dataScience.alwaysTrustNotebooks": true,
    "python.languageServer": "Pylance",
    "python.formatting.provider": "black",
    "python.dataScience.askForKernelRestart": false,
    "python.dataScience.sendSelectionToInteractiveWindow": true,
    "gutterpreview.imagePreviewMaxHeight": 400,
    "markdown-preview-enhanced.HTML5EmbedUseLinkSyntax": true,
    "sync.quietSync": true,
    "editor.formatOnSave": true,
    "[jsonc]": {
        "editor.defaultFormatter": "vscode.json-language-features"
    },
    "cSpell.userWords": [
        "discretize",
        "multimodality",
        "quickstart"
    ],
    "cSpell.enabled": true,
    "python.analysis.typeCheckingMode": "basic",
    "workbench.iconTheme": "material-icon-theme",
    // "markdownlint.customRules": [
    //   "{docsmsft.docs-linting}/markdownlint-custom-rules/rules.js"
    // ],
    // "markdownlint.config": {
    //   "MD028": false
    // },
    "jupyter.alwaysTrustNotebooks": true,
    "editor.accessibilitySupport": "off",
    // "yaml.schemas": {
    //   "file:///toc.schema.json": "/toc\\.yml/i"
    // },
    "search.useIgnoreFiles": false,
    "sync.forceUpload": true,
    "jupyter.askForKernelRestart": false,
    "sync.forceDownload": true,
    "jupyter.insidersChannel": "off",
    "terminal.integrated.commandsToSkipShell": [
        "language-julia.interrupt"
    ],
    // "workbench.colorTheme": "Pitch Black",
    "workbench.startupEditor": "welcomePage",
    "footsteps.doHighlightChanges": false,
    "foam.graph.style": {
        "fontSize": 11,
        "lineColor": "#277da1",
        "lineWidth": 0.2,
        "particleWidth": 1.0,
        "highlightedForeground": "#f9c74f",
        "node": {
            "note": "#277da1",
            "placeholder": "#545454",
        }
    },
    //   "todo-tree.regex.regex": "(//|#|<!--|;|/\\*|^|^\\s*(-|\\d+.))\\s*($TAGS)",
    "githubPullRequests.fileListLayout": "flat",
    "jupyter.interactiveWindowMode": "perFile",
    "ai.azureml.experimental: V2Config": true,
    "jupyter.allowUnauthorizedRemoteConnection": true,
    "security.workspace.trust.untrustedFiles": "open",
    "editor.wordSeparators": "/\\()\"':,.;<>~!@#$%^&*|+=[]{}`?-",
    "notebook.insertToolbarLocation": "betweenCells",
    "notebook.showCellStatusBar": "hidden",
    "redhat.telemetry.enabled": false,
    "tabnine.receiveBetaChannelUpdates": true,
    "editor.inlineSuggest.enabled": true,
    "editor.tabCompletion": "on",
    "github.copilot.enable": {
        "*": true,
        "yaml": true,
        "plaintext": true,
        "markdown": true,
        "r": true,
    },
    "github.copilot.autocomplete.enable": true,
    "github.copilot.advanced": {
        "debug.autocomplete.showConfidence": true,
    },
    "julia.symbolCacheDownload": true,
    "jupyter.sendSelectionToInteractiveWindow": true,
    "jupyter.interactiveWindow.alwaysScrollOnNewCell": true,
    "markdown.marp.enableHtml": true,
    "jupyter.themeMatplotlibPlots": true,
    "jupyter.showVariableViewWhenDebugging": true,
    "jupyter.generateSVGPlots": true,
    "r.plot.useHttpgd": true,
    "editor.stickyScroll.enabled": true,
    // "python.terminal.activateEnvironment": false
}

@karrtikr
Copy link

karrtikr commented Sep 3, 2022

Please don't activate the terminal using conda activate ddm before running the command. Make sure the setting python.terminal.activateEnvironment is set to false.

@akzaidi
Copy link

akzaidi commented Sep 7, 2022

Okay, I set it to false. Here is the output from running conda run in the integrated terminal:

alizaidi in azdevrl in datadrivenmodel on  alizaidi/lag_improvements [?] via 🐍 v3.7.4 via 📐 v3.6.3 
❯ echo $CONDA_SHLVL
2

alizaidi in azdevrl in datadrivenmodel on  alizaidi/lag_improvements [?] via 🐍 v3.7.4 via 📐 v3.6.3 
❯ 

alizaidi in azdevrl in datadrivenmodel on  alizaidi/lag_improvements [?] via 🐍 v3.7.4 via 📐 v3.6.3 
❯ conda run -n ddm --no-capture-output python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir ~/bonsai/datadrivenmodel -s --cache-clear tests
>>>PYTHON-EXEC-OUTPUT
equivalent command: /anaconda/envs/ddm/bin/python -m pytest --collect-only --rootdir /home/alizaidi/bonsai/datadrivenmodel -s --cache-clear tests
============================= test session starts ==============================
platform linux -- Python 3.7.7, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/alizaidi/bonsai/datadrivenmodel
plugins: anyio-3.4.0, clarity-1.0.1, hydra-core-1.0.5
collected 30 items / 1 error

<Package tests>
  <Module test_dataclass.py>
    <Function test_cartpole_at_st1>
    <Function test_cartpole_at_st>
    <Function test_diff_labels_1>
    <Function test_diff_labels_2>
    <Function test_concatenate_states_1>
    <Function test_concatenate_states_2>
    <Function test_concatenate_states_3>
  <Module test_gboost.py>
    <Function test_shape>
    <Function test_lgm_train>
    <Function test_xgb_train>
  <Module test_gboost_diff.py>
    <Function test_shape>
    <Function test_lgm_train>
    <Function test_xgb_train>
  <Module test_loaders.py>
    <Function test_cartpole_at_st1>
    <Function test_cartpole_at_st>
    <Function test_base_reader>
    <Function test_diff_names>
  <Module test_pytorch_model.py>
    <Function test_shape>
    <Function test_build>
    <Function test_fit>
    <Function test_sweep>
    <Function test_predictor>
    <Function test_save_model>
  <Module test_sklearn.py>
    <Function test_shape>
    <Function test_svm_train>
    <Function test_linear_train>
    <Function test_gbr_train>
  <Module test_sweeping.py>
    <Function test_sweeping_lightgbm>
    <Function test_sweeping_svr>
    <Function test_sweeping_xgboost>

==================================== ERRORS ====================================
_________________ ERROR collecting tests/test_gboost_concat.py _________________
/anaconda/envs/ddm/lib/python3.7/site-packages/pandas/core/indexes/base.py:3361: in get_loc
    return self._engine.get_loc(casted_key)
pandas/_libs/index.pyx:76: in pandas._libs.index.IndexEngine.get_loc
    ???
pandas/_libs/index.pyx:108: in pandas._libs.index.IndexEngine.get_loc
    ???
pandas/_libs/hashtable_class_helper.pxi:5198: in pandas._libs.hashtable.PyObjectHashTable.get_item
    ???
pandas/_libs/hashtable_class_helper.pxi:5206: in pandas._libs.hashtable.PyObjectHashTable.get_item
    ???
E   KeyError: 'prev_state_x_position_1'

The above exception was the direct cause of the following exception:
tests/test_gboost_concat.py:17: in <module>
    concatenated_zero_padding=True,
base.py:243: in load_csv
    concatenate_var_length=concatenate_var_length,
dataclass.py:376: in load_csv
    aux_df = self.df_concatenate_inputs(df)
dataclass.py:875: in df_concatenate_inputs
    feat_array = df[feat].values
/anaconda/envs/ddm/lib/python3.7/site-packages/pandas/core/frame.py:3458: in __getitem__
    indexer = self.columns.get_loc(key)
/anaconda/envs/ddm/lib/python3.7/site-packages/pandas/core/indexes/base.py:3363: in get_loc
    raise KeyError(key) from err
E   KeyError: 'prev_state_x_position_1'
=============================== warnings summary ===============================
../../../../anaconda/envs/ddm/lib/python3.7/site-packages/pkg_resources/__init__.py:1131
  /anaconda/envs/ddm/lib/python3.7/site-packages/pkg_resources/__init__.py:1131: DeprecationWarning: Use of .. or absolute path in a resource path is not allowed and will raise exceptions in a future release.
    self, resource_name

../../../../anaconda/envs/ddm/lib/python3.7/site-packages/mlflow/types/schema.py:49
  /anaconda/envs/ddm/lib/python3.7/site-packages/mlflow/types/schema.py:49: DeprecationWarning: `np.object` is a deprecated alias for the builtin `object`. To silence this warning, use `object` by itself. Doing this will not modify any behavior and is safe. 
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    binary = (7, np.dtype("bytes"), "BinaryType", np.object)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
ERROR tests/test_gboost_concat.py - KeyError: 'prev_state_x_position_1'
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
===================== 30 tests collected, 1 error in 3.38s =====================

<<<PYTHON-EXEC-OUTPUT
Traceback (most recent call last):
  File "/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py", line 26, in <module>
    runpy.run_path(module, run_name="__main__")
  File "/anaconda/envs/ddm/lib/python3.7/runpy.py", line 263, in run_path
    pkg_name=pkg_name, script_name=fname)
  File "/anaconda/envs/ddm/lib/python3.7/runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "/anaconda/envs/ddm/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/testing_tools/run_adapter.py", line 22, in <module>
    main(tool, cmd, subargs, toolargs)
  File "/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/testing_tools/adapter/__main__.py", line 99, in main
    parents, result = run(toolargs, **subargs)
  File "/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/testing_tools/adapter/pytest/_discovery.py", line 44, in discover
    raise Exception("pytest discovery failed (exit code {})".format(ec))
Exception: pytest discovery failed (exit code 2)
ERROR conda.cli.main_run:execute(49): `conda run python /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir /home/alizaidi/bonsai/datadrivenmodel -s --cache-clear tests` failed. (See above for error)

Unfortunately, the extension continues to fail at discovering tests:

Experiment 'pythonaa' is active
Experiment 'pythonSurveyNotificationcf' is active
LSP Notebooks experiment is enabled
LSP Notebooks interactive window support is enabled
Python interpreter path: /anaconda/envs/ddm/bin/python
> conda info --json
> poetry env list --full-path
cwd: ~/courses/streamlit/streamlit-examples/streamlit_prophet
[ERROR 2022-8-6 23:42:15.805]: [Error: Command failed: poetry env list --full-path
/bin/sh: 1: poetry: not found

	at ChildProcess.exithandler (node:child_process:399:12)
	at ChildProcess.emit (node:events:526:28)
	at maybeClose (node:internal/child_process:1092:16)
	at Socket.<anonymous> (node:internal/child_process:451:11)
	at Socket.emit (node:events:526:28)
	at Pipe.<anonymous> (node:net:687:12)] {
  killed: false,
  code: 127,
  signal: null,
  cmd: 'poetry env list --full-path'
}
> /usr/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /usr/include/python3.6 ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /usr/include/python3.7 ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
[ERROR 2022-8-6 23:42:15.906]: [Error: Command failed: /usr/include/python3.6 /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
/bin/sh: 1: /usr/include/python3.6: Permission denied

	at ChildProcess.exithandler (node:child_process:399:12)
	at ChildProcess.emit (node:events:526:28)
	at maybeClose (node:internal/child_process:1092:16)
	at Socket.<anonymous> (node:internal/child_process:451:11)
	at Socket.emit (node:events:526:28)
	at Pipe.<anonymous> (node:net:687:12)] {
  killed: false,
  code: 126,
  signal: null,
  cmd: '/usr/include/python3.6 /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py'
}
[ERROR 2022-8-6 23:42:15.908]: [Error: Command failed: /usr/include/python3.7 /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
/bin/sh: 1: /usr/include/python3.7: Permission denied

	at ChildProcess.exithandler (node:child_process:399:12)
	at ChildProcess.emit (node:events:526:28)
	at maybeClose (node:internal/child_process:1092:16)
	at Socket.<anonymous> (node:internal/child_process:451:11)
	at Socket.emit (node:events:526:28)
	at Pipe.<anonymous> (node:net:687:12)] {
  killed: false,
  code: 126,
  signal: null,
  cmd: '/usr/include/python3.7 /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py'
}
> conda run -n ddm --no-capture-output python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/printEnvVariables.py
> /anaconda/envs/aisc/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/alae/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/archai/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/audio/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/audiotf2/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/azureml_py36_automl/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/azureml_py36_pytorch/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/azureml_py36_tensorflow/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/bonsai/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/bonsai-batch/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/bonsai-preview/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/bonsai-scg-latest/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/brain/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/cleanrl/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/clip-dalle/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/clip-featureviz/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/coinbot/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/colab/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/d3rl/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/dalle/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/data2sim/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/ddm/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/ddm3/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/dmcontrol/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/dvc/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/hfcourse/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/iglu/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/jpylb/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/jupy/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/mineiglurl/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/minerl/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/modelcard/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/nlu/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/parsing/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/py37_default/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/py37_pytorch/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/py37_tensorflow/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/ray/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/repsol/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/rl/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/rlex/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/rlydoe/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/sbi/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/timeformers/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /anaconda/envs/torch/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
> /bin/bash ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
[ERROR 2022-8-6 23:42:31.569]: Error: Command failed: /bin/bash /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py
/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py: line 4: import: command not found
/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py: line 5: import: command not found
/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py: line 10: syntax error near unexpected token `">>>PYTHON-EXEC-OUTPUT"'
/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py: line 10: `print(">>>PYTHON-EXEC-OUTPUT")'

    at ChildProcess.exithandler (node:child_process:399:12)
    at ChildProcess.emit (node:events:526:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) {
  killed: false,
  code: 2,
  signal: null,
  cmd: '/bin/bash /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py /home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/interpreterInfo.py'
}
Starting Pylance language server.
> conda run -n ddm --no-capture-output python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/printEnvVariables.py
> conda run -n ddm --no-capture-output python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir ~/bonsai/datadrivenmodel -s --cache-clear tests
cwd: ~/bonsai/datadrivenmodel
[ERROR 2022-8-6 23:43:3.162]: Error discovering pytest tests:
 n [Error]: 
EnvironmentLocationNotFound: Not a conda environment: /anaconda/envs/ddm/envs/ddm


    at ChildProcess.<anonymous> (/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/out/client/extension.js:2:240364)
    at Object.onceWrapper (node:events:646:26)
    at ChildProcess.emit (node:events:526:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
Python interpreter path: /usr/bin/python3
Starting Pylance language server.
Python interpreter path: /anaconda/envs/ddm/bin/python
> conda run -n ddm --no-capture-output python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/printEnvVariables.py
> conda run -n ddm --no-capture-output python ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir ~/bonsai/datadrivenmodel -s --cache-clear tests
cwd: ~/bonsai/datadrivenmodel
[ERROR 2022-8-7 1:46:17.863]: Error discovering pytest tests:
 n [Error]: 
EnvironmentLocationNotFound: Not a conda environment: /anaconda/envs/ddm/envs/ddm


    at ChildProcess.<anonymous> (/home/alizaidi/.vscode-server-insiders/extensions/ms-python.python-2022.14.0/out/client/extension.js:2:240364)
    at Object.onceWrapper (node:events:646:26)
    at ChildProcess.emit (node:events:526:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)

@karrtikr karrtikr removed the info-needed Issue requires more information from poster label Sep 7, 2022
@karrtikr
Copy link

Hey everyone, check #18493 (comment) out, let me know if you have the same issue.

@karrtikr karrtikr added the info-needed Issue requires more information from poster label Sep 15, 2022
@aaravind100
Copy link

Hey everyone, check #18493 (comment) out, let me know if you have the same issue.

Hey @karrtikr , got some time to check this today. Can confirm having conda in the environment was causing the test discovery to fail. The environment which I was using had conda=4.12.0=py37h89c1867_0 and after removing it the test discovery succeeds.

I tried install the latest conda-4.14.0-py37h06a4308_0 and latest canary conda-4.14.0+39_gde3db7f75-py37_0, but the test discovery fails. So the solution for the time being is to remove conda from the environment.

@karrtikr karrtikr removed the info-needed Issue requires more information from poster label Sep 17, 2022
@akzaidi
Copy link

akzaidi commented Sep 28, 2022

Unfortunately, the issue persists for me in my conda environments, even after removing conda as suggested by #18493. I suppose I should wait to see if #17242 resolves my issue?

@karrtikr
Copy link

@akzaidi Now that we can reproduce it, I'll open an issue on conda. And I'm pretty sure fixing that will also fix your issue.

Btw, can you demonstrate to me that conda is not installed in your environment?

@karrtikr
Copy link

@aaravind100 In order to open an issue on conda, can you help me with the following deets:

  • conda info
  • conda config --show-sources
  • conda list --show-channel-urls

They're needed to file a bug report on conda :)

@karrtikr karrtikr added the info-needed Issue requires more information from poster label Sep 28, 2022
@akzaidi

This comment was marked as resolved.

@karrtikr

This comment was marked as resolved.

@aaravind100
Copy link

@aaravind100 In order to open an issue on conda, can you help me with the following deets:

* `conda info`

* `conda config --show-sources`

* `conda list --show-channel-urls`

They're needed to file a bug report on conda :)

Just updated to 22.9.0, the issue still persists. Here's the info below.

(dev162) pytest_explore ~> conda info

     active environment : dev162
    active env location : /home/aravia1/miniconda3/envs/dev162
            shell level : 1
       user config file : /home/aravia1/.condarc
 populated config files : /home/aravia1/.condarc
          conda version : 22.9.0
    conda-build version : not installed
         python version : 3.9.12.final.0
       virtual packages : __cuda=11.6=0
                          __linux=5.15.57.1=0
                          __glibc=2.35=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /home/aravia1/miniconda3  (writable)
      conda av data dir : /home/aravia1/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/aravia1/miniconda3/pkgs
                          /home/aravia1/.conda/pkgs
       envs directories : /home/aravia1/miniconda3/envs
                          /home/aravia1/.conda/envs
               platform : linux-64
             user-agent : conda/22.9.0 requests/2.28.1 CPython/3.9.12 Linux/5.15.57.1-microsoft-standard-WSL2 ubuntu/22.04.1 glibc/2.35
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False
(dev162) pytest_explore ~> conda config --show-sources
==> /home/aravia1/.condarc <==
auto_activate_base: False
ssl_verify: False
(dev162) pytest_explore ~> conda list --show-channel-urls
# packages in environment at /home/aravia1/miniconda3/envs/dev162:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main    conda-forge
absl-py                   1.0.0                    pypi_0    pypi
adal                      1.2.7                    pypi_0    pypi
adlfs                     2021.8.2                 pypi_0    pypi
aiobotocore               1.4.2                    pypi_0    pypi
aiohttp                   3.8.1                    pypi_0    pypi
aioitertools              0.8.0                    pypi_0    pypi
aiosignal                 1.2.0                    pypi_0    pypi
alembic                   1.5.8                    pypi_0    pypi
appdirs                   1.4.4                    pypi_0    pypi
argon2-cffi               21.3.0                   pypi_0    pypi
argon2-cffi-bindings      21.2.0                   pypi_0    pypi
asn1crypto                1.5.1                    pypi_0    pypi
async-timeout             4.0.2                    pypi_0    pypi
asynctest                 0.13.0                   pypi_0    pypi
attrs                     21.4.0                   pypi_0    pypi
azure-common              1.1.28                   pypi_0    pypi
azure-core                1.22.1                   pypi_0    pypi
azure-datalake-store      0.0.52                   pypi_0    pypi
azure-identity            1.10.0                   pypi_0    pypi
azure-keyvault-secrets    4.4.0                    pypi_0    pypi
azure-storage-blob        12.11.0                  pypi_0    pypi
backcall                  0.2.0                    pypi_0    pypi
beautifulsoup4            4.11.1                   pypi_0    pypi
black                     20.8b0                   pypi_0    pypi
bleach                    5.0.0                    pypi_0    pypi
blosc                     1.18.1               he1b5a44_0    conda-forge
bokeh                     2.0.1            py37hc8dfbb8_0    conda-forge
boto3                     1.17.106                 pypi_0    pypi
botocore                  1.20.106                 pypi_0    pypi
bottleneck                1.3.2            py37h161383b_2    conda-forge
ca-certificates           2021.10.8            ha878542_0    conda-forge
cachetools                4.2.4                    pypi_0    pypi
certifi                   2021.10.8        py37h89c1867_2    conda-forge
cffi                      1.12.3           py37h2e261b9_0    defaults
chardet                   3.0.4                 py37_1003    conda-forge
charset-normalizer        2.0.12                   pypi_0    pypi
click                     8.0.4            py37h89c1867_0    conda-forge
cloudpickle               2.0.0                    pypi_0    pypi
conda                     4.12.0           py37h89c1867_0    conda-forge
conda-package-handling    1.6.0            py37h7b6447c_0    defaults
cryptography              3.3.2                    pypi_0    pypi
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
cython                    0.29.28                  pypi_0    pypi
cytoolz                   0.10.1           py37h516909a_0    conda-forge
dask                      2021.11.2          pyhd8ed1ab_0    conda-forge
dask-core                 2021.11.2          pyhd8ed1ab_0    conda-forge
dask-glm                  0.2.0                      py_1    conda-forge
dask-ml                   1.9.0              pyhd8ed1ab_0    conda-forge
dbus                      1.13.6               hfdff14a_1    conda-forge
debugpy                   1.6.0                    pypi_0    pypi
decorator                 5.1.1                    pypi_0    pypi
deepdiff                  5.8.0                    pypi_0    pypi
defusedxml                0.7.1                    pypi_0    pypi
deprecated                1.2.13                   pypi_0    pypi
distributed               2021.11.2        py37h89c1867_0    conda-forge
docstring-parser          0.14.1                   pypi_0    pypi
entrypoints               0.4                      pypi_0    pypi
et-xmlfile                1.1.0                    pypi_0    pypi
expat                     2.2.9                he1b5a44_2    conda-forge
fastapi                   0.67.0                   pypi_0    pypi
fastjsonschema            2.15.3                   pypi_0    pypi
fire                      0.4.0                    pypi_0    pypi
flake8                    4.0.1                    pypi_0    pypi
flatbuffers               2.0                      pypi_0    pypi
fontconfig                2.13.1            he4413a7_1000    conda-forge
freetype                  2.10.1               he06d7ca_0    conda-forge
frozenlist                1.3.0                    pypi_0    pypi
fsspec                    2021.8.1                 pypi_0    pypi
future                    0.18.2                   pypi_0    pypi
gcsfs                     2021.8.1                 pypi_0    pypi
geos                      3.8.1                he1b5a44_0    conda-forge
gettext                   0.19.8.1          hf34092f_1004    conda-forge
gitdb                     4.0.9                    pypi_0    pypi
gitpython                 3.1.27                   pypi_0    pypi
glib                      2.66.3               h58526e2_0    conda-forge
google-api-core           2.7.3                    pypi_0    pypi
google-api-python-client  1.12.11                  pypi_0    pypi
google-auth               1.35.0                   pypi_0    pypi
google-auth-httplib2      0.1.0                    pypi_0    pypi
google-auth-oauthlib      0.5.1                    pypi_0    pypi
google-cloud-core         2.3.0                    pypi_0    pypi
google-cloud-storage      1.44.0                   pypi_0    pypi
google-crc32c             1.3.0                    pypi_0    pypi
google-resumable-media    2.3.2                    pypi_0    pypi
googleapis-common-protos  1.56.0                   pypi_0    pypi
greenlet                  1.1.2                    pypi_0    pypi
grpcio                    1.41.1                   pypi_0    pypi
grpcio-tools              1.41.1                   pypi_0    pypi
gst-plugins-base          1.14.5               h0935bb2_2    conda-forge
gstreamer                 1.14.5               h36ae1b5_2    conda-forge
heapdict                  1.0.1                      py_0    conda-forge
httplib2                  0.20.4                   pypi_0    pypi
humanfriendly             8.2                      pypi_0    pypi
icu                       58.2              hf484d3e_1000    conda-forge
idna                      2.8                      py37_0    defaults
imbalanced-learn          0.9.0                    pypi_0    pypi
imblearn                  0.0                      pypi_0    pypi
importlib-metadata        4.2.0                    pypi_0    pypi
importlib-resources       5.7.1                    pypi_0    pypi
inflection                0.5.1                    pypi_0    pypi
iniconfig                 1.1.1                    pypi_0    pypi
ipykernel                 6.13.0                   pypi_0    pypi
ipython                   7.33.0                   pypi_0    pypi
ipython-genutils          0.2.0                    pypi_0    pypi
isodate                   0.6.1                    pypi_0    pypi
jedi                      0.18.1                   pypi_0    pypi
jinja2                    3.0.3                    pypi_0    pypi
jmespath                  0.10.0                   pypi_0    pypi
joblib                    1.1.0              pyhd8ed1ab_0    conda-forge
jpeg                      9c                h14c3975_1001    conda-forge
jsonschema                3.2.0                    pypi_0    pypi
jupyter-client            7.3.0                    pypi_0    pypi
jupyter-core              4.10.0                   pypi_0    pypi
jupyterlab-pygments       0.2.2                    pypi_0    pypi
kfp                       1.8.12                   pypi_0    pypi
kfp-pipeline-spec         0.1.14                   pypi_0    pypi
kfp-server-api            1.8.1                    pypi_0    pypi
kiwisolver                1.3.1            py37hc928c03_0    conda-forge
kneed                     0.7.0                    pypi_0    pypi
kubernetes                12.0.1                   pypi_0    pypi
libblas                   3.8.0               14_openblas    conda-forge
libcblas                  3.8.0               14_openblas    conda-forge
libedit                   3.1.20181209         hc058e9b_0    defaults
libffi                    3.2.1                hd88cf55_4    defaults
libgcc-ng                 9.1.0                hdf63c60_0    defaults
libgfortran-ng            7.3.0                hdf63c60_5    conda-forge
libglib                   2.66.3               hbe7bbb4_0    conda-forge
libiconv                  1.16                 h516909a_0    conda-forge
liblapack                 3.8.0               14_openblas    conda-forge
libllvm10                 10.0.1               he513fc3_3    conda-forge
libopenblas               0.3.7                h5ec1e0e_6    conda-forge
libpng                    1.6.37               hed695b0_1    conda-forge
libstdcxx-ng              9.1.0                hdf63c60_0    defaults
libtiff                   4.0.9             h648cc4a_1002    conda-forge
libuuid                   2.32.1            h14c3975_1000    conda-forge
libxcb                    1.13              h14c3975_1002    conda-forge
libxml2                   2.9.9                h13577e0_2    conda-forge
lightgbm                  3.3.2                    pypi_0    pypi
llvmlite                  0.34.0           py37h5202443_2    conda-forge
locket                    0.2.0                      py_2    conda-forge
lz4                       3.0.2            py37h5a7ed16_2    conda-forge
lz4-c                     1.9.2                he1b5a44_0    conda-forge
mako                      1.2.0                    pypi_0    pypi
markupsafe                2.1.1                    pypi_0    pypi
matplotlib                3.2.1                         0    conda-forge
matplotlib-base           3.2.1            py37hef1b27d_0    defaults
matplotlib-inline         0.1.3                    pypi_0    pypi
mccabe                    0.6.1                    pypi_0    pypi
mergedeep                 1.3.4                    pypi_0    pypi
mistune                   0.8.4                    pypi_0    pypi
mlrun                     1.0.0                    pypi_0    pypi
msal                      1.17.0                   pypi_0    pypi
msal-extensions           1.0.0                    pypi_0    pypi
msgpack-python            1.0.0            py37h99015e2_1    conda-forge
msrest                    0.6.21                   pypi_0    pypi
multidict                 6.0.2                    pypi_0    pypi
multipledispatch          0.6.0                      py_0    conda-forge
mypy-extensions           0.4.3                    pypi_0    pypi
nbclient                  0.6.2                    pypi_0    pypi
nbconvert                 6.5.0                    pypi_0    pypi
nbformat                  5.4.0                    pypi_0    pypi
ncurses                   6.1                  he6710b0_1    defaults
nest-asyncio              1.5.5                    pypi_0    pypi
nomkl                     1.0                  h5ca1d4c_0    conda-forge
notebook                  6.4.11                   pypi_0    pypi
nuclio-jupyter            0.9.1                    pypi_0    pypi
nuclio-sdk                0.4.0                    pypi_0    pypi
numba                     0.51.2           py37h9fdb41a_0    conda-forge
numexpr                   2.7.1            py37h9fdb41a_3    conda-forge
numpy                     1.21.6                   pypi_0    pypi
oauthlib                  3.2.0                    pypi_0    pypi
olefile                   0.46                       py_0    conda-forge
onnx                      1.11.0                   pypi_0    pypi
onnxconverter-common      1.9.0                    pypi_0    pypi
onnxmltools               1.11.0                   pypi_0    pypi
onnxruntime               1.11.1                   pypi_0    pypi
openpyxl                  3.0.9                    pypi_0    pypi
openssl                   1.1.1h               h516909a_0    conda-forge
ordered-set               4.1.0                    pypi_0    pypi
orjson                    3.6.8                    pypi_0    pypi
ortools                   9.3.10497                pypi_0    pypi
oscrypto                  1.3.0                    pypi_0    pypi
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pandas                    1.3.5                    pypi_0    pypi
pandasql                  0.7.3                    pypi_0    pypi
pandocfilters             1.5.0                    pypi_0    pypi
parso                     0.8.3                    pypi_0    pypi
partd                     1.1.0                      py_0    conda-forge
pathspec                  0.9.0                    pypi_0    pypi
patsy                     0.5.2              pyhd8ed1ab_0    conda-forge
pcre                      8.44                 he1b5a44_0    conda-forge
pexpect                   4.8.0                    pypi_0    pypi
pickleshare               0.7.5                    pypi_0    pypi
pillow                    5.3.0           py37h00a061d_1000    conda-forge
pip                       22.2.2                   pypi_0    pypi
plotly                    5.7.0                    pypi_0    pypi
pluggy                    1.0.0                    pypi_0    pypi
pmdarima                  1.8.5                    pypi_0    pypi
portalocker               2.4.0                    pypi_0    pypi
prometheus-client         0.14.1                   pypi_0    pypi
prompt-toolkit            3.0.29                   pypi_0    pypi
protobuf                  3.20.1                   pypi_0    pypi
psutil                    5.7.0            py37h8f50634_1    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
ptyprocess                0.7.0                    pypi_0    pypi
py                        1.11.0                   pypi_0    pypi
pyarrow                   5.0.0                    pypi_0    pypi
pyasn1                    0.4.8                    pypi_0    pypi
pyasn1-modules            0.2.8                    pypi_0    pypi
pycodestyle               2.8.0                    pypi_0    pypi
pycosat                   0.6.3            py37h14c3975_0    defaults
pycparser                 2.19                     py37_0    defaults
pycryptodomex             3.15.0                   pypi_0    pypi
pydantic                  1.9.0                    pypi_0    pypi
pyflakes                  2.4.0                    pypi_0    pypi
pygments                  2.12.0                   pypi_0    pypi
pyjwt                     2.3.0                    pypi_0    pypi
pymysql                   1.0.2                    pypi_0    pypi
pyodbc                    4.0.30           py37he1b5a44_0    conda-forge
pyopenssl                 19.0.0                   py37_0    conda-forge
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pyqt                      5.9.2            py37hcca6a23_4    conda-forge
pyrsistent                0.18.1                   pypi_0    pypi
pysocks                   1.7.1                    py37_0    conda-forge
pytest                    7.1.2                    pypi_0    pypi
python                    3.7.4                h265db76_1    defaults
python-blosc              1.9.1            py37h0da4684_0    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-dotenv             0.17.1                   pypi_0    pypi
python-editor             1.0.4                    pypi_0    pypi
python-snappy             0.5.4            py37h484ad9e_3    conda-forge
python_abi                3.7                     1_cp37m    conda-forge
pytz                      2019.3                     py_0    conda-forge
pyyaml                    5.4.1                    pypi_0    pypi
pyzmq                     22.3.0                   pypi_0    pypi
qt                        5.9.7                h52cfd70_2    conda-forge
readline                  7.0                  h7b6447c_5    defaults
regex                     2022.4.24                pypi_0    pypi
requests                  2.22.0                   py37_0    conda-forge
requests-oauthlib         1.3.1                    pypi_0    pypi
requests-toolbelt         0.9.1                    pypi_0    pypi
rsa                       4.8                      pypi_0    pypi
ruamel_yaml               0.15.46          py37h14c3975_0    defaults
s3fs                      2021.8.1                 pypi_0    pypi
s3transfer                0.4.2                    pypi_0    pypi
scikit-learn              1.0.2                    pypi_0    pypi
scikit-plot               0.3.7                    pypi_0    pypi
scipy                     1.5.2            py37hb14ef9d_0    conda-forge
seaborn                   0.11.2                   pypi_0    pypi
semver                    2.13.0                   pypi_0    pypi
send2trash                1.8.0                    pypi_0    pypi
setuptools                41.4.0                   py37_0    conda-forge
shap                      0.40.0                   pypi_0    pypi
shapely                   1.7.1            py37hd5b9dd9_1    conda-forge
sip                       4.19.8          py37hf484d3e_1000    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
skl2onnx                  1.11.1                   pypi_0    pypi
slicer                    0.0.7                    pypi_0    pypi
smmap                     5.0.0                    pypi_0    pypi
snappy                    1.1.8                he1b5a44_3    conda-forge
snowflake-connector-python 2.6.2                    pypi_0    pypi
snowflake-sqlalchemy      1.3.3                    pypi_0    pypi
sortedcontainers          2.1.0                      py_0    conda-forge
soupsieve                 2.3.2.post1              pypi_0    pypi
sqlalchemy                1.4.36                   pypi_0    pypi
sqlite                    3.30.0               h7b6447c_0    defaults
starlette                 0.14.2                   pypi_0    pypi
statsmodels               0.12.1           py37ha21ca33_1    conda-forge
storey                    1.0.4                    pypi_0    pypi
strip-hints               0.1.10                   pypi_0    pypi
stumpy                    1.10.2                   pypi_0    pypi
tabulate                  0.8.9                    pypi_0    pypi
tblib                     1.6.0                      py_0    conda-forge
tenacity                  8.0.1                    pypi_0    pypi
termcolor                 1.1.0                    pypi_0    pypi
terminado                 0.13.3                   pypi_0    pypi
threadpoolctl             3.1.0              pyh8a188c0_0    conda-forge
tini                      0.18.0            h14c3975_1001    conda-forge
tinycss2                  1.1.1                    pypi_0    pypi
tk                        8.6.8                hbc83047_0    defaults
toml                      0.10.2                   pypi_0    pypi
tomli                     2.0.1                    pypi_0    pypi
toolz                     0.10.0                     py_0    conda-forge
tornado                   6.1              py37h4abf009_0    conda-forge
tqdm                      4.36.1                     py_0    conda-forge
traitlets                 5.1.1                    pypi_0    pypi
typed-ast                 1.5.3                    pypi_0    pypi
typer                     0.4.1                    pypi_0    pypi
typing-extensions         3.10.0.2                 pypi_0    pypi
ujson                     5.2.0                    pypi_0    pypi
unixodbc                  2.3.7             hd1b7508_1000    conda-forge
uritemplate               3.0.1                    pypi_0    pypi
urllib3                   1.25.11                  pypi_0    pypi
v3io                      0.5.15                   pypi_0    pypi
v3io-frames               0.10.2                   pypi_0    pypi
v3iofs                    0.1.10                   pypi_0    pypi
wcwidth                   0.2.5                    pypi_0    pypi
webencodings              0.5.1                    pypi_0    pypi
websocket-client          1.3.2                    pypi_0    pypi
wheel                     0.33.6                   py37_0    conda-forge
wrapt                     1.14.1                   pypi_0    pypi
xgboost                   1.6.0                    pypi_0    pypi
xorg-libxau               1.0.9                h14c3975_0    conda-forge
xorg-libxdmcp             1.1.3                h516909a_0    conda-forge
xz                        5.2.4                h14c3975_4    defaults
yaml                      0.1.7                had09818_2    defaults
yarl                      1.7.2                    pypi_0    pypi
zict                      2.0.0                      py_0    conda-forge
zipp                      3.8.0                    pypi_0    pypi
zlib                      1.2.11               h7b6447c_3    defaults

@aaravind100
Copy link

Also found this weird path resolution problem :D

when environment is active:

(dev162) pytest_explore ~> which conda
/home/aravia1/miniconda3/envs/dev162/bin/conda
(dev162) pytest_explore ~> conda --version
conda 22.9.0
(dev162) pytest_explore ~> ~/miniconda3/envs/dev162/bin/conda --version
conda 4.12.0

when no environment is active:

pytest_explore ~> which conda
/home/aravia1/miniconda3/condabin/conda
pytest_explore ~> conda --version
conda 22.9.0
pytest_explore ~> ~/miniconda3/condabin/conda --version
conda 22.9.0

@karrtikr karrtikr removed the info-needed Issue requires more information from poster label Sep 29, 2022
@karrtikr
Copy link

karrtikr commented Nov 9, 2022

Created a bug on conda: conda/conda#12082, feel free to upvote that to raise priority. Closing in favor of conda.

@karrtikr karrtikr closed this as not planned Won't fix, can't repro, duplicate, stale Nov 9, 2022
@karrtikr karrtikr added this to the November 2022 milestone Nov 9, 2022
@karrtikr karrtikr added the verified Verification succeeded label Nov 15, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug triage-needed Needs assignment to the proper sub-team verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

7 participants