Skip to content

Conda environment not found #19421

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
kjohnsen opened this issue Jul 6, 2022 · 2 comments
Closed

Conda environment not found #19421

kjohnsen opened this issue Jul 6, 2022 · 2 comments
Assignees
Labels
info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team

Comments

@kjohnsen
Copy link

kjohnsen commented Jul 6, 2022

Issue Type: Bug

This only happens on some of my conda environments. I'm not sure why.

  1. I'm on WSL
  2. My conda environment "sim" uses Python 3.7
  3. I try to discover tests
  4. The output is as follows
> conda run -n sim --no-capture-output python ~/.vscode-server-insiders/extensions/ms-python.python-2022.8.1/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.8.1/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir . -s --cache-clear tests
cwd: .
[ERROR 2022-6-6 15:6:56.228]: Error discovering pytest tests:
 [n [Error]: 
DirectoryNotACondaEnvironmentError: The target directory exists, but it is not a conda environment.
Use 'conda create' to convert the directory to a conda environment.
  target directory: /home/kyle/anaconda3/envs/sim/envs/sim

VS Code version: Code - Insiders 1.69.0-insider (f1abeea, 2022-06-30T05:16:49.202Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: No
Remote OS version: Linux x64 5.10.16.3-microsoft-standard-WSL2
Remote OS version: Linux x64 5.10.16.3-microsoft-standard-WSL2
Remote OS version: Linux x64 5.10.16.3-microsoft-standard-WSL2

System Info
Item Value
CPUs Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.73GB (5.97GB free)
Process Argv --crash-reporter-id 13862219-8062-4bb8-969d-b654fdb7b5e1
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 5.10.16.3-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)
Memory (System) 24.85GB (16.64GB free)
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 5.10.16.3-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)
Memory (System) 24.85GB (16.64GB free)
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 5.10.16.3-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)
Memory (System) 24.85GB (16.64GB free)
VM 0%
Extensions (47)
Extension Author (truncated) Version
better-cpp-syntax jef 1.15.18
theme-monokai-pro-vscode mon 1.1.20
jupyter-keymap ms- 1.0.0
remote-containers ms- 0.241.2
remote-ssh ms- 0.82.1
remote-ssh-edit ms- 0.80.0
remote-wsl ms- 0.66.3
open-in-browser tec 2.0.0
vscode-icons vsc 11.12.0
vim vsc 1.23.1
material-theme zhu 3.15.2
spellright ban 3.0.64
better-toml bun 0.3.2
doxdocgen csc 1.4.0
gitlens-insiders eam 2022.6.2205
matlab Gim 2.3.1
vscode-pull-request-github Git 0.44.0
path-autocomplete ion 1.19.1
better-cpp-syntax jef 1.15.18
svg joc 1.4.18
restructuredtext lex 189.0.0
restructuredtext-pack lex 1.0.1
python ms- 2022.8.1
vscode-pylance ms- 2022.6.30
jupyter ms- 2022.7.1001841019
jupyter-keymap ms- 1.0.0
jupyter-renderers ms- 1.0.8
cmake-tools ms- 1.11.26
cpptools ms- 1.10.7
cpptools-extension-pack ms- 1.2.0
makefile-tools ms- 0.5.0
vsliveshare ms- 1.0.5625
vsliveshare-audio ms- 0.1.91
color-highlight nau 2.5.0
autodocstring njp 0.6.1
vscode-yaml red 1.8.0
LiveServer rit 5.7.5
synthwave-vscode Rob 0.1.11
markdown-preview-enhanced shd 0.6.3
code-spell-checker str 2.2.5
html-preview-vscode tht 0.2.5
simple-rst tro 1.5.2
cmake twx 0.0.17
vscode-lldb vad 1.7.0
vscodeintellicode Vis 1.2.22
YouCode you 0.1.3
markdown-all-in-one yzh 3.4.3

(8 theme extensions excluded)

A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256198
vslsvsres303:30308271
pythonvspyl392:30422396
pythontb:30258533
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
vscod805:30301674
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30404738
wslgetstarted:30449409
vscscmwlcmt:30465136
cppdebug:30492333
pylanb8912:30522163
vsclangdf:30492506

@vscodenpa vscodenpa added the triage-needed Needs assignment to the proper sub-team label Jul 6, 2022
@dbaeumer dbaeumer assigned brettcannon and unassigned dbaeumer Jul 7, 2022
@vscodenpa vscodenpa removed the triage-needed Needs assignment to the proper sub-team label Jul 7, 2022
@brettcannon brettcannon removed their assignment Jul 7, 2022
@brettcannon brettcannon transferred this issue from microsoft/vscode Jul 7, 2022
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jul 7, 2022
@karrtikr
Copy link

karrtikr commented Jul 7, 2022

Hi @kjohnsen, thank you for reaching out! Your issue seems like the dup of #19069.

Did you open VSCode from an activated terminal? If so, can you try opening your repo from a non-activated terminal, and see if the problem still occurs? 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).

Some more information I need for the VSCode terminal which might be helpful:

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

@karrtikr karrtikr self-assigned this Jul 11, 2022
@karrtikr karrtikr added the info-needed Issue requires more information from poster label Jul 29, 2022
@karrtikr
Copy link

Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on then we will be happy to re-open this issue to pick up where we left off.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

5 participants