Skip to content

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

Closed as not planned

Description

@1vecera

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 -->

Activity

  1. 1vecera commented on May 5, 2022

    @1vecera
    Author
  2. added
    bugIssue identified by VS Code Team member as probable bug
    area-environmentsFeatures relating to handling interpreter environments
    on May 5, 2022
  3. added
    investigatingWe are looking into the cause of the issue
    and removed
    triage-neededNeeds assignment to the proper sub-team
    on May 5, 2022
  4. karrtikr commented on May 5, 2022

    @karrtikr

    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.

  5. 1vecera commented on May 10, 2022

    @1vecera
    Author

    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)
    
    
    
  6. karrtikr commented on May 24, 2022

    @karrtikr

    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.

  7. 37 remaining items

  8. akzaidi commented on Sep 28, 2022

    @akzaidi

    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?

  9. karrtikr commented on Sep 28, 2022

    @karrtikr

    Ali Zaidi (@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?

  10. karrtikr commented on Sep 28, 2022

    @karrtikr

    Ajith Aravind (@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 :)

  11. akzaidi commented on Sep 28, 2022

    @akzaidi
  12. karrtikr commented on Sep 28, 2022

    @karrtikr
  13. aaravind100 commented on Sep 29, 2022

    @aaravind100

    Ajith Aravind (@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
  14. aaravind100 commented on Sep 29, 2022

    @aaravind100

    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
  15. karrtikr commented on Nov 9, 2022

    @karrtikr

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

  16. locked as resolved and limited conversation to collaborators on Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugtriage-neededNeeds assignment to the proper sub-teamverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions