Skip to content
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

Wrong conda environment used in terminal #22817

Closed
haenslerjulien opened this issue Jan 31, 2024 · 2 comments
Closed

Wrong conda environment used in terminal #22817

haenslerjulien opened this issue Jan 31, 2024 · 2 comments
Assignees
Labels
info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team

Comments

@haenslerjulien
Copy link

haenslerjulien commented Jan 31, 2024

Type: Bug

Behaviour

Since the Activate Environments in Terminal Using Environment Variables update, i am experiencing issues with my conda environment in the VSCode terminal

Expected vs. Actual

When running pytest in my terminal, i get errors pointing that some packages are not installed.

Hovering over the 'bash' logo as suggested in the update link shows that the right conda env is being used, but running the pytest command clearly indicates that my conda env isn't actually being used. (Python: Activated environment for ~/miniconda3/envs/myanonymizedenv/bin/python)

I have tried deactivating and reactivating the conda env, setting the "terminal.integrated.inheritEnv" parameter to true and back to false, setting the "terminal.integrated.shellIntegration.enabled" parameter to true and back to false.
I also don't have any conda environment being activated directly in my .bashrc

I am pretty sure this is a VSCode problem since running pytest in my ubuntu terminal after activating the conda environment works just fine and doesn't show any package related errors.

Extension version: 2023.22.1
VS Code version: Code 1.85.2 (8b3775030ed1a69b13e4f4c628c612102e30a681, 2024-01-18T06:40:19.222Z)
OS version: Linux x64 6.5.0-15-generic
Modes:

System Info
Item Value
CPUs 12th Gen Intel(R) Core(TM) i7-1265U (12 x 4192)
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
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 2, 1, 1
Memory (System) 31.03GB (23.51GB free)
Process Argv --unity-launch --crash-reporter-id 14a966c6-f1d8-485b-83cd-fef4e55a9dd5
Screen Reader no
VM 0%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE x11
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscorecescf:30445987
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30951796
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
dsvsc019acf:30951919
3ef8e399:30949928

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jan 31, 2024
@haenslerjulien
Copy link
Author

Update: switching to the pre-release version on VSCode extensions panel fixed the issue.

Regarding this i am not sure this issue is still relevant.

@karrtikr
Copy link

karrtikr commented Feb 1, 2024

Hi, generally a shell restart is required once an environment is activated in terminal, which is what you might be running into. Regardless, feel free to let us know if the issue reoccurs and we'll be happy to have a look again.

@karrtikr karrtikr closed this as not planned Won't fix, can't repro, duplicate, stale Feb 1, 2024
@github-actions github-actions bot added the info-needed Issue requires more information from poster label Feb 1, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
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

2 participants