Skip to content

Conda environment not activated in VSC terminal #6343

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
alexiej opened this issue Jun 26, 2019 · 6 comments
Closed

Conda environment not activated in VSC terminal #6343

alexiej opened this issue Jun 26, 2019 · 6 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@alexiej
Copy link

alexiej commented Jun 26, 2019

Issue Type: Bug

When I run terminal and type python with activate conda for python 3.7.3 it still shows python version 2.7.10 instead :(. In the regular terminal (iterm, terminal) I don't have this problem. System: MacOS

Extension version: 2019.6.22090
VS Code version: Code 1.35.1 (c7d83e57cd18f18026a8162d042843bda1bcf21f, 2019-06-12T14:29:22.216Z)
OS version: Darwin x64 18.6.0

System Info

image

Item Value
CPUs Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz (8 x 2300)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 5, 4, 3
Memory (System) 16.00GB (1.90GB free)
Process Argv
Screen Reader no
VM 0%
@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Jun 26, 2019
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Jun 26, 2019
@karrtikr
Copy link

Please send the output of command `python -c "import sys;print(sys.executable)" before and after activating conda.

Can you please inform which terminal are you using (if not iterm). A screenshot of the issue would help.

@karrtikr karrtikr added the info-needed Issue requires more information from poster label Jun 28, 2019
@alexiej
Copy link
Author

alexiej commented Jun 30, 2019

I use iterm.

It is always /usr/bin/python/, even if I activate the environment.

image

image

image

@karrtikr
Copy link

karrtikr commented Jul 3, 2019

Thanks for this.

  • Could you please paste the Python output panel and Developer tools output as mentioned in the issue template, to check if any errors popped up.
  • The output of conda --version to get the conda version you are using.

@karrtikr karrtikr changed the title Terminal use python 2.7 instead of 3.7.3 Conda environment not activated in VSC terminal Jul 3, 2019
@alexiej
Copy link
Author

alexiej commented Jul 8, 2019

Thanks for this.

  • Could you please paste the Python output panel and Developer tools output as mentioned in the issue template, to check if any errors popped up.
  • The output of conda --version to get the conda version you are using.

Visual Studio Code Terminal (bash):
conda --version: conda 4.6.14
python --version: Python 2.7.10
conda activate wavenet:
python -c "import sys;print(sys.executable)": /usr/bin/python

conda deactivate:
python -c "import sys;print(sys.executable)": /usr/bin/python

iterm:

conda --version: conda 4.6.14
python --version: Python 3.7.3
conda activate wavenet:
python -c "import sys;print(sys.executable)" : /anaconda3/envs/wavenet/bin/python
conda deactivate:
python -c "import sys;print(sys.executable)" : /anaconda3/bin/python

python output:

User belongs to experiment group 'AlwaysDisplayTestExplorer - control'
Starting Jedi Python language engine.

Linter 'pylint' is not installed. Please install it or select another linter".
Error: Module 'pylint' not installed.

Linter 'pylint' is not installed. Please install it or select another linter".
Error: Module 'pylint' not installed.

log from Developer tools:
-1562578303315.log

CPUs Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz (8 x 2300)
GPU Status 2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: enabledoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_deferred_display_list: disabled_offskia_renderer: disabled_offsurface_synchronization: enabled_onvideo_decode: enabledviz_display_compositor: disabled_offwebgl: enabledwebgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 16.00GB (0.95GB free)
Process Argv  
Screen Reader no
VM 0%
Extension Author (truncated) Version
vscode-dash dee 2.1.0
gc-excelviewer Gra 2.1.32
vscode-docker ms- 0.6.4
python ms- 2019.6.22090
vetur oct 0.21.1
nativescript Tel 0.10.1

image

@alexiej alexiej closed this as completed Jul 8, 2019
@ghost ghost removed the triage label Jul 8, 2019
@alexiej alexiej reopened this Jul 8, 2019
@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Jul 8, 2019
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Jul 8, 2019
@DonJayamanne DonJayamanne self-assigned this Jul 8, 2019
@DonJayamanne
Copy link

This is a known issue in VS Code and we're in the process of resolving this.
More info can be found here https://code.visualstudio.com/updates/v1_36#_launch-terminals-with-clean-environments

As a temporary solution please change the setting terminal.integrated.inheritEnv to false as outlined in https://code.visualstudio.com/updates/v1_36#_launch-terminals-with-clean-environments

Please let us know how this goes

@karrtikr
Copy link

karrtikr commented Aug 5, 2019

Closing as it's a VS Code issue and no response was provided.

@karrtikr karrtikr closed this as completed Aug 5, 2019
@ghost ghost removed the triage label Aug 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Aug 12, 2019
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
Projects
None yet
Development

No branches or pull requests

4 participants