question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

conda environments keep disappearing when `conda run` is not supported

See original GitHub issue

I have the exact same problem as another issue, his link is #19105 ,but the problem is not solved. I don’t see any errors in my logs。 vscode

Version: 1.67.2 (system setup)
Commit: c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5
Datetime: 2022-05-17T18:15:52.058Z
Electron: 17.4.1
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.13-electron.0
OS: Windows_NT x64 10.0.19043

python Extension

python v2022.6.2

Python Show Output

用户属于 'pythonaa' 实验组
用户属于 'pythonTensorboardExperiment' 实验组
用户属于 'PythonPyTorchProfiler' 实验组
用户属于 'pythonDeprecatePythonPath' 实验组
用户属于 'pythonInterpreterInfoPinned' 实验组
> D:\ProgramData\Anaconda3 info --json
> conda info --json
> D:\ProgramData\Anaconda3\envs\test\python.exe ~\.vscode\extensions\ms-python.python-2022.6.2\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.6.2\pythonFiles\interpreterInfo.py
> D:\ProgramData\Anaconda3\python.exe ~\.vscode\extensions\ms-python.python-2022.6.2\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.6.2\pythonFiles\interpreterInfo.py
Python 解释器路径: D:\ProgramData\Anaconda3\envs\test\python.exe
> D:\ProgramData\Anaconda3\envs\bert_pytorch\python.exe ~\.vscode\extensions\ms-python.python-2022.6.2\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.6.2\pythonFiles\interpreterInfo.py
> D:/ProgramData/Anaconda3/Scripts/activate && conda activate test && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python ~/.vscode/extensions/ms-python.python-2022.6.2/pythonFiles/printEnvVariables.py
> D:\ProgramData\Anaconda3\envs\gameai\python.exe ~\.vscode\extensions\ms-python.python-2022.6.2\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.6.2\pythonFiles\interpreterInfo.py
> D:\ProgramData\Anaconda3\envs\my_paddlenlp\python.exe ~\.vscode\extensions\ms-python.python-2022.6.2\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.6.2\pythonFiles\interpreterInfo.py
> D:\ProgramData\Anaconda3\envs\onnx\python.exe ~\.vscode\extensions\ms-python.python-2022.6.2\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.6.2\pythonFiles\interpreterInfo.py
> D:\ProgramData\Anaconda3\envs\py2\python.exe ~\.vscode\extensions\ms-python.python-2022.6.2\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.6.2\pythonFiles\interpreterInfo.py
> D:\ProgramData\Anaconda3\envs\pyqt5\python.exe ~\.vscode\extensions\ms-python.python-2022.6.2\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.6.2\pythonFiles\interpreterInfo.py
> D:\ProgramData\Anaconda3\envs\pytorch_clone\python.exe ~\.vscode\extensions\ms-python.python-2022.6.2\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.6.2\pythonFiles\interpreterInfo.py
> D:\ProgramData\Anaconda3\envs\yolox\python.exe ~\.vscode\extensions\ms-python.python-2022.6.2\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.6.2\pythonFiles\interpreterInfo.py
正在启动 Pylance 语言服务器。

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:15

github_iconTop GitHub Comments

1reaction
HaliComingcommented, May 27, 2022

Thank you for your help. @karrtikr

1reaction
HaliComingcommented, May 27, 2022

Great, I fixed this issue. I know where the problem is. Hope it helps someone who has encountered this problem. Environment variables cannot contain PYTHONPATH or PYTHONHOME variables. I found out that PYTHONHOME=D:/ProgramData/Anaconda3 was set in my system, after I removed it, everything went back to normal.

image

P.S. The python version in my base environment is 3.8.3. Because of the existence of the PYTHONHOME environment variable, all my other environments except the python version which is 3.8.3 have disappeared, such as the 3.7.11 environment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Anaconda python environment disappeared from VS code
Reloading the VS code/rebooting the computer sometimes gives me back the conda environment. But it will disappear again when I open another . ......
Read more >
Troubleshooting — conda 22.11.1.post16+ce4e810c9 ...
Occasionally, an installed package becomes corrupted. Conda works by unpacking the packages in the pkgs directory and then hard-linking them to the environment....
Read more >
Install Python packages to a specific Conda environment
To install the Python packages in the correct Conda environment, first activate the environment before running pip install or conda install ...
Read more >
Tips & tricks — conda-forge 2022.12.21 documentation
Why does that happen?¶ ; conda-forge and ; defaults are not 100% compatible. In the example above it is known that ; defaults...
Read more >
From soup to nuts guide for setting up a conda environment
You can check this out by running conda env list command: (*) refers to the default environment (when we are not using any...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found