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

Python Shared Conda Envs Broken #18450

Closed
alex-ew opened this issue Feb 4, 2022 · 3 comments
Closed

Python Shared Conda Envs Broken #18450

alex-ew opened this issue Feb 4, 2022 · 3 comments

Comments

@alex-ew
Copy link

alex-ew commented Feb 4, 2022

Issue Type: Bug

Since the last release, I cannot run or debug python code using a shared conda env (one which is created in a directory I don't have write access to). I created a local conda env which seems to still work ok.

When using a shared another piece of the puzzle is an error message: "EnvironmentLocationNotFound: Not a conda environment: /home/%USER%/.conda/envs/dev". This is because the dev env exists in a different location (e.g. dev /home/%admin%/miniconda3/envs/dev)

Extension version: 2022.0.1786462952
VS Code version: Code 1.64.0 (5554b12acf27056905806867f251c859323ff7e9, 2022-02-03T04:22:20.678Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: No
Remote OS version: Linux x64 5.11.0-27-generic
Remote OS version: Linux x64 5.8.0-59-generic

System Info
Item Value
CPUs AMD Ryzen 7 4800H with Radeon Graphics (16 x 2895)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.36GB (8.06GB free)
Process Argv --crash-reporter-id eca863e8-448a-4437-8461-75801c541b61
Screen Reader no
VM 0%
Item Value
Remote SSH: greenie
OS Linux x64 5.11.0-27-generic
CPUs AMD Ryzen 7 2700X Eight-Core Processor (16 x 2200)
Memory (System) 62.80GB (22.60GB free)
VM 0%
Item Value
Remote SSH: bluey
OS Linux x64 5.8.0-59-generic
CPUs AMD Ryzen 7 3800X 8-Core Processor (16 x 2104)
Memory (System) 62.80GB (3.73GB free)
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392cf:30425750
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30433059
pythonvs932:30410667
wslgetstarted:30433507
vscop341:30404997
vsrem710cf:30416617

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Feb 4, 2022
@brettcannon
Copy link
Member

What version of conda are you using?

@fbriol
Copy link

fbriol commented Feb 6, 2022

I have the same problem, under Linux and MacOS. When starting the debugging, the extension searches for python in an environment that does not exist, because it takes as root the target environment:

(base): /Users/${USER}/anaconda3
(forge): /Users/${USER}/anaconda3/envs/forge

The extension tries to access my forge environment in this directory.

/Users/fbriol/anaconda3/envs/forge/envs/forge

I switched to the previous version (v2021.12.1559732655), and the problem disappeared.

Here is the full output of the discovering pytest error:

Experiment 'pythonaacf' is active
Experiment 'pythonTensorboardExperiment' is active
Experiment 'pythonSurveyNotificationcf' is active
Experiment 'PythonPyTorchProfiler' is active
Experiment 'pythonDeprecatePythonPath' is active
> conda info --json
> /usr/bin/python3 ~/.vscode/extensions/ms-python.python-2022.0.1786462952/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2022.0.1786462952/pythonFiles/interpreterInfo.py
> /usr/lib/python2.7 ~/.vscode/extensions/ms-python.python-2022.0.1786462952/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2022.0.1786462952/pythonFiles/interpreterInfo.py
> ~/anaconda3/bin/python ~/.vscode/extensions/ms-python.python-2022.0.1786462952/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2022.0.1786462952/pythonFiles/interpreterInfo.py
[ERROR 2022-1-6 9:38:5.96]: [Error: Command failed: /usr/lib/python2.7 /Users/fbriol/.vscode/extensions/ms-python.python-2022.0.1786462952/pythonFiles/get_output_via_markers.py /Users/fbriol/.vscode/extensions/ms-python.python-2022.0.1786462952/pythonFiles/interpreterInfo.py
/bin/sh: /usr/lib/python2.7: is a directory

	at ChildProcess.exithandler (child_process.js:317:12)
	at ChildProcess.emit (events.js:315:20)
	at maybeClose (internal/child_process.js:1048:16)
	at Socket.<anonymous> (internal/child_process.js:439:11)
	at Socket.emit (events.js:315:20)
	at Pipe.<anonymous> (net.js:673:12)] {
  killed: false,
  code: 126,
  signal: null,
  cmd: '/usr/lib/python2.7 /Users/fbriol/.vscode/extensions/ms-python.python-2022.0.1786462952/pythonFiles/get_output_via_markers.py /Users/fbriol/.vscode/extensions/ms-python.python-2022.0.1786462952/pythonFiles/interpreterInfo.py'
}
> ~/anaconda3/envs/forge/bin/python ~/.vscode/extensions/ms-python.python-2022.0.1786462952/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2022.0.1786462952/pythonFiles/interpreterInfo.py
Python interpreter path: ~/anaconda3/envs/forge/bin/python
Starting Pylance language server.
> . ~/anaconda3/bin/activate && conda activate forge && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python ~/.vscode/extensions/ms-python.python-2022.0.1786462952/pythonFiles/printEnvVariables.py
> . ~/anaconda3/bin/activate && conda activate forge && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python ~/.vscode/extensions/ms-python.python-2022.0.1786462952/pythonFiles/printEnvVariables.py
> conda run -n forge --no-capture-output python ~/.vscode/extensions/ms-python.python-2022.0.1786462952/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2022.0.1786462952/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir . -s --cache-clear .
cwd: .
[ERROR 2022-1-6 9:38:8.77]: Error discovering pytest tests:
 r [Error]: 
EnvironmentLocationNotFound: Not a conda environment: /Users/fbriol/anaconda3/envs/forge/envs/forge


    at ChildProcess.<anonymous> (/Users/fbriol/.vscode/extensions/ms-python.python-2022.0.1786462952/out/client/extension.js:32:39235)
    at Object.onceWrapper (events.js:422:26)
    at ChildProcess.emit (events.js:315:20)
    at maybeClose (internal/child_process.js:1048:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) # #

VS Code System Information

timestamp: 2022-02-06T08:49:56.438Z

Information Provider

key value
id wraith13.sysinfo-vscode
name sysinfo-vscode
displayName System Information
version 2.4.1

options

key value
categories ["basic","extensions"]
withSensitiveData false
withInternalExtensions false

Warnings

key value
W001 LANG environment variable is empty. Clipboard related extensions do not work correctly with Non-ASCII characters. To avoid this problem, you should launch VS Code from Terminal.app. See microsoft/vscode#16261.

OS Information

key value
arch x64
platform darwin
type Darwin
release 21.2.0
EOL "\n"
endianness LE

Process Information

key value
arch x64
env {}

versions

key value
node 14.16.0
v8 9.1.269.39-electron.0
uv 1.40.0
zlib 1.2.11
brotli 1.0.9
ares 1.16.1
modules 89
nghttp2 1.41.0
napi 7
llhttp 2.1.3
openssl 1.1.1
cldr 38.0
icu 68.1
tz 2021a
unicode 13.0
electron 13.5.2
microsoft-build 10705177

VS Code Information

key value
version 1.64.0

env

key value
appName Visual Studio Code
language en

extensions

JavaScript Debugger

key value
id ms-vscode.js-debug
isActive false
name js-debug
version 1.64.2
displayName JavaScript Debugger
description An extension for debugging Node.js programs and Chrome.
publisher ms-vscode
categories ["Debuggers"]

JavaScript Debugger Companion Extension

key value
id ms-vscode.js-debug-companion
isActive false
name js-debug-companion
version 1.0.15
displayName JavaScript Debugger Companion Extension
description Companion extension to js-debug that provides capability for remote debugging
publisher ms-vscode
categories ["Other"]

Reference Search View

key value
id ms-vscode.references-view
isActive false
name references-view
version 0.0.81
displayName Reference Search View
description Reference Search results as separate, stable view in the sidebar
publisher ms-vscode
categories ["Programming Languages"]

vscode-js-profile-table

key value
id ms-vscode.vscode-js-profile-table
isActive false
name vscode-js-profile-table
version 0.0.18
description Text visualizer for profiles taken from the JavaScript debugger
publisher ms-vscode

Antidote - VS Code

key value
id druideinformatique.antidote
isActive true
name antidote
version 1.0.16
displayName Antidote - VS Code
description
publisher druideinformatique
categories ["Other"]

GitHub Copilot

key value
id GitHub.copilot
isActive true
name copilot
version 1.7.4812
displayName GitHub Copilot
description Your AI pair programmer
publisher GitHub
categories ["Other"]

Python

key value
id ms-python.python
isActive true
name python
version 2022.0.1786462952
displayName Python
description IntelliSense (Pylance), Linting, Debugging (multi-threaded, remote), Jupyter Notebooks, code formatting, refactoring, unit tests, and more.
publisher ms-python
categories ["Programming Languages","Debuggers","Linters","Formatters","Other","Data Science","Machine Learning","Notebooks"]

Pylance

key value
id ms-python.vscode-pylance
isActive true
name vscode-pylance
version 2022.2.0
displayName Pylance
description A performant, feature-rich language server for Python in VS Code
publisher ms-python
categories ["Programming Languages"]

Jupyter

key value
id ms-toolsai.jupyter
isActive true
name jupyter
version 2022.1.1001775990
displayName Jupyter
description Jupyter notebook support, interactive programming and computing that supports Intellisense, debugging and more.
publisher ms-toolsai
categories ["Programming Languages","Other","Extension Packs","Data Science","Machine Learning","Notebooks","Visualization"]

Jupyter Keymap

key value
id ms-toolsai.jupyter-keymap
isActive false
name jupyter-keymap
version 1.0.0
displayName Jupyter Keymap
description Jupyter keymaps for notebooks
publisher ms-toolsai
categories ["Notebooks"]

Jupyter Notebook Renderers

key value
id ms-toolsai.jupyter-renderers
isActive true
name jupyter-renderers
version 1.0.6
displayName Jupyter Notebook Renderers
description Renderers for Jupyter Notebooks (with plotly, vega, gif, png, svg, jpeg and other such outputs)
publisher ms-toolsai
categories ["Other","Data Science","Machine Learning","Notebooks","Visualization"]

Remote - SSH

key value
id ms-vscode-remote.remote-ssh
isActive false
name remote-ssh
version 0.70.0
displayName Remote - SSH
description Open any folder on a remote machine using SSH and take advantage of VS Code's full feature set.
publisher ms-vscode-remote
categories ["Other"]

Remote - SSH: Editing Configuration Files

key value
id ms-vscode-remote.remote-ssh-edit
isActive false
name remote-ssh-edit
version 0.70.0
displayName Remote - SSH: Editing Configuration Files
description Edit SSH configuration files
publisher ms-vscode-remote
categories ["Programming Languages","Snippets"]

CMake Tools

key value
id ms-vscode.cmake-tools
isActive false
name cmake-tools
version 1.9.2
displayName CMake Tools
description Extended CMake support in Visual Studio Code
publisher ms-vscode
categories ["Other"]

C/C++

key value
id ms-vscode.cpptools
isActive false
name cpptools
version 1.8.2
displayName C/C++
description C/C++ IntelliSense, debugging, and code browsing.
publisher ms-vscode
categories ["Programming Languages","Debuggers","Formatters","Linters","Snippets"]

Rust

key value
id rust-lang.rust
isActive false
name rust
version 0.7.8
displayName Rust
description Rust for Visual Studio Code (powered by Rust Language Server/Rust Analyzer). Provides lints, code completion and navigation, formatting and more.
publisher rust-lang
categories ["Programming Languages","Linters","Snippets","Formatters","Other"]

Rewrap

key value
id stkb.rewrap
isActive true
name rewrap
version 1.16.1
displayName Rewrap
description Hard word wrapping for comments and other text at a given column.
publisher stkb
categories ["Formatters"]

CMake

key value
id twxs.cmake
isActive false
name cmake
version 0.0.17
displayName CMake
description CMake langage support for Visual Studio Code
publisher twxs
categories ["Languages","Snippets","Other"]

System Information

key value
id wraith13.sysinfo-vscode
isActive true
name sysinfo-vscode
version 2.4.1
displayName System Information
description Show system information ( includes extensions list ) by markdown or JSON for VS Code
publisher wraith13
categories ["Other"]

@karthiknadig
Copy link
Member

Duplicate of #18436

@karthiknadig karthiknadig marked this as a duplicate of #18436 Feb 7, 2022
@karthiknadig karthiknadig removed the triage-needed Needs assignment to the proper sub-team label Feb 10, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants