Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Rogue conda processes left running after closing vscode (do not use conda run for fetching env variables) #19347

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
2 tasks
ludbri opened this issue Jun 22, 2022 · 17 comments · Fixed by #19819
Closed
2 tasks
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug needs PR Ready to be worked on

Comments

@ludbri
Copy link

ludbri commented Jun 22, 2022

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

Steps to reproduce:

  1. start vscode without any open file
  2. open any .py file, with or without #%% markers
  3. wait for Python task to show up in Task manager grouped under Visual Studio Code
    image
  4. Close VScode and wait for a few seconds
  5. A rogue Python task remains running with high CPU and Power usage
    image

Expected behaviour:

All python processes should close when exiting VScode

Attempted debugging

Disabling the jupyter extension in VSCode solves the problem.

Changing python language server settings as in the issue (with similar symptoms) in #15586. i.e. adding "python.experiments.optOutFrom": ["pythonJediLSP"] and "python.languageServer": "Pylance" to settings.json. This did not solve the problem.

According to the task manager, the command line for the rogue processes is: C:\Anaconda3\python.exe "C:\Anaconda3\Scripts\conda-script.py" "run" "-n" "base" "--no-capture-output" "python" "c:\Users\***\.vscode\extensions\ms-python.python-2022.8.0\pythonFiles\get_output_via_markers.py" "c:/Users/***/.vscode/extensions/ms-pyt

VS Code Version

Code 1.68.1 (30d9c6cd9483b2cc586687151bcbcd635f373630, 2022-06-14T12:48:58.283Z)

Jupyter Extension Version

2022.5.1001601848

Jupyter logs

Visual Studio Code (1.68.1, undefined, desktop)
Jupyter Extension Version: 2022.5.1001601848.
Python Extension Version: 2022.8.0.
Workspace folder c:\Users\lu4345br\Work Folders\Documents\Gits\MDP_production_system
info 9:36:54.302: ZMQ install verified.
User belongs to experiment group 'jupyterTest'
User belongs to experiment group 'jupyterEnhancedDataViewer'
info 9:36:54.774: LSP Notebooks experiment is disabled -- not using Pylance
info 9:36:54.785: Experiment status for python is {"enabled":true,"optInto":[],"optOutFrom":["pythonJediLSP"]}
info 9:36:58.461: Process Execution: > c:\Anaconda3\python.exe -m pip list
> c:\Anaconda3\python.exe -m pip list
error 9:37:58.159: Failed to get activated conda env variables for c:\Anaconda3\python.exe
info 9:40:22.403: Loading webview. View is notset
info 9:40:22.405: Loading web view...
info 9:40:22.406: Webview panel created.
info 9:40:23.444: Web view react rendered

Coding Language and Runtime Version

Python v3.8.5

Language Extension Version (if applicable)

v.2022.8.0

Anaconda Version (if applicable)

custom
EDIT: conda version 4.11.0

Running Jupyter locally or remotely?

Local

@ludbri ludbri added bug Issue identified by VS Code Team member as probable bug triage-needed Needs assignment to the proper sub-team labels Jun 22, 2022
@rchiodo
Copy link

rchiodo commented Jun 22, 2022

Thanks for the issue. This should be caused by the Python extension.

@rchiodo rchiodo transferred this issue from microsoft/vscode-jupyter Jun 22, 2022
@rchiodo rchiodo removed their assignment Jun 22, 2022
@karthiknadig karthiknadig added the area-environments Features relating to handling interpreter environments label Jun 22, 2022
@karrtikr
Copy link

Can you send the output of conda info command? Make sure conda points to the conda binary in C:\Anaconda3.

@karrtikr karrtikr added the info-needed Issue requires more information from poster label Jun 22, 2022
@karrtikr
Copy link

If you're using ArcGIS Pro conda env, this is a dup of conda/conda#11506.

@ludbri
Copy link
Author

ludbri commented Jun 22, 2022

Results from conda info, when run in either VScode terminal or Anaconda prompt:

(base) C:\Users\***>conda info

     active environment : base
    active env location : C:\Anaconda3
            shell level : 1
       user config file : C:\Users\***\.condarc
 populated config files : C:\Users\**\.condarc
          conda version : 4.11.0
    conda-build version : 3.20.5
         python version : 3.8.5.final.0
       virtual packages : __win=0=0
                          __archspec=1=x86_64
       base environment : C:\Anaconda3  (read only)
      conda av data dir : C:\Anaconda3\etc\conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Anaconda3\pkgs
                          C:\Users\***\.conda\pkgs
                          C:\Users\***\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\***\.conda\envs
                          C:\Anaconda3\envs
                          C:\Users\***\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.11.0 requests/2.27.1 CPython/3.8.5 Windows/10 Windows/10.0.19041
          administrator : False
             netrc file : None
           offline mode : False

@ludbri
Copy link
Author

ludbri commented Jun 22, 2022

And if it may be of interest. Here's the quite long package list:

conda list ...
(base) C:\Users\***>conda list
# packages in environment at C:\Anaconda3:
#
# Name                    Version                   Build  Channel
_anaconda_depends         2021.11                  py38_0
_ipyw_jlab_nb_ext_conf    0.1.0                    py38_0
_tflow_select             2.3.0                     eigen
absl-py                   1.0.0              pyhd8ed1ab_0    conda-forge
aiohttp                   3.8.1            py38h294d835_0    conda-forge
aiosignal                 1.2.0              pyhd8ed1ab_0    conda-forge
alabaster                 0.7.12                     py_0    conda-forge
anaconda                  custom                   py38_1
anaconda-client           1.8.0              pyhd8ed1ab_0    conda-forge
anaconda-navigator        1.10.0                   py38_0
anaconda-project          0.10.2             pyhd8ed1ab_0    conda-forge
anyio                     3.5.0            py38haa244fe_0    conda-forge
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
argh                      0.26.2          pyh9f0ad1d_1002    conda-forge
argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0           py38h294d835_1    conda-forge
arrow                     1.2.2              pyhd8ed1ab_0    conda-forge
asn1crypto                1.4.0              pyh9f0ad1d_0    conda-forge
astor                     0.8.1              pyh9f0ad1d_0    conda-forge
astroid                   2.5.8            py38haa244fe_0    conda-forge
astropy                   5.0.1            py38h6f4d8f0_0    conda-forge
asttokens                 2.0.5              pyhd8ed1ab_0    conda-forge
astunparse                1.6.3              pyhd8ed1ab_0    conda-forge
async-timeout             4.0.2              pyhd8ed1ab_0    conda-forge
async_generator           1.10                       py_0    conda-forge
atomicwrites              1.4.0              pyh9f0ad1d_0    conda-forge
attrs                     21.4.0             pyhd8ed1ab_0    conda-forge
autopep8                  1.6.0              pyhd8ed1ab_0    conda-forge
babel                     2.9.1              pyh44b312d_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
backports.shutil_get_terminal_size 1.0.0                      py_3    conda-forge
backports.tempfile        1.0                        py_0    conda-forge
backports.weakref         1.0.post1       py38h32f6830_1002    conda-forge
bcrypt                    3.2.0            py38h294d835_2    conda-forge
beautifulsoup4            4.10.0             pyha770c72_0    conda-forge
binaryornot               0.4.4                      py_1    conda-forge
bitarray                  2.3.5            py38h294d835_0    conda-forge
bkcharts                  0.2                      py38_0
black                     22.1.0             pyhd8ed1ab_0    conda-forge
blas                      1.0                         mkl
bleach                    4.1.0              pyhd8ed1ab_0    conda-forge
blinker                   1.4                        py_1    conda-forge
blosc                     1.21.0               h0e60522_0    conda-forge
bokeh                     2.4.2            py38haa244fe_0    conda-forge
boto                      2.49.0                     py_0    conda-forge
bottleneck                1.3.2            py38h6f4d8f0_5    conda-forge
brotli                    1.0.9                h8ffe710_6    conda-forge
brotli-bin                1.0.9                h8ffe710_6    conda-forge
brotlipy                  0.7.0           py38h294d835_1003    conda-forge
bzip2                     1.0.8                h8ffe710_4    conda-forge
c-blosc2                  2.0.4                h09319c2_1    conda-forge
ca-certificates           2021.10.8            h5b45459_0    conda-forge
cachetools                4.2.4              pyhd8ed1ab_0    conda-forge
certifi                   2021.10.8        py38haa244fe_1    conda-forge
cffi                      1.15.0           py38hd8c33c5_0    conda-forge
cfitsio                   4.0.0                hd67004f_0    conda-forge
chardet                   4.0.0            py38haa244fe_2    conda-forge
charls                    2.2.0                h39d44d4_0    conda-forge
charset-normalizer        2.0.11             pyhd8ed1ab_0    conda-forge
click                     8.0.3            py38haa244fe_1    conda-forge
cloudpickle               2.0.0              pyhd8ed1ab_0    conda-forge
clyent                    1.2.2                      py_1    conda-forge
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
comtypes                  1.1.10           py38haa244fe_1    conda-forge
conda                     4.11.0           py38haa244fe_0    conda-forge
conda-build               3.20.5                   py38_1
conda-content-trust       0.1.3              pyhd8ed1ab_0    conda-forge
conda-env                 2.6.0                         1
conda-pack                0.7.0              pyh6c4a22f_0    conda-forge
conda-package-handling    1.7.3            py38h31c79cd_1    conda-forge
conda-token               0.3.0              pyhd3eb1b0_0
conda-verify              3.4.2                      py_1
console_shortcut          0.1.1                         4
contextlib2               21.6.0             pyhd8ed1ab_0    conda-forge
cookiecutter              1.7.3              pyh6c4a22f_1    conda-forge
cryptography              36.0.1           py38hb7941b4_0    conda-forge
curl                      7.81.0               h789b8ee_0    conda-forge
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
cython                    0.29.27          py38h885f38d_0    conda-forge
cytoolz                   0.11.2           py38h294d835_1    conda-forge
daal4py                   2021.5.0         py38he5193b3_0    conda-forge
dal                       2021.5.0           h0e2418a_796    conda-forge
dask                      2022.1.1           pyhd8ed1ab_0    conda-forge
dask-core                 2022.1.1           pyhd8ed1ab_0    conda-forge
dataclasses               0.8                pyhc8e2a94_3    conda-forge
debugpy                   1.5.1            py38h885f38d_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
diff-match-patch          20200713           pyh9f0ad1d_0    conda-forge
distributed               2022.1.1         py38haa244fe_0    conda-forge
docutils                  0.15.2           py38haa244fe_3    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
et_xmlfile                1.0.1                   py_1001    conda-forge
executing                 0.8.2              pyhd8ed1ab_0    conda-forge
fastcache                 1.1.0            py38h294d835_3    conda-forge
ffmpeg                    4.3.1                ha925a31_0    conda-forge
filelock                  3.4.2              pyhd8ed1ab_1    conda-forge
flake8                    3.9.2              pyhd8ed1ab_0    conda-forge
flask                     2.0.2              pyhd8ed1ab_0    conda-forge
flatbuffers               2.0                      pypi_0    pypi
flit-core                 3.6.0              pyhd8ed1ab_0    conda-forge
fonttools                 4.29.1           py38h294d835_0    conda-forge
freetype                  2.10.4               h546665d_1    conda-forge
frozenlist                1.3.0            py38h294d835_0    conda-forge
fsspec                    2022.1.0           pyhd8ed1ab_0    conda-forge
future                    0.18.2           py38haa244fe_4    conda-forge
gast                      0.4.0              pyh9f0ad1d_0    conda-forge
get_terminal_size         1.0.0                h38e98db_0
gevent                    21.12.0          py38h294d835_0    conda-forge
giflib                    5.2.1                h8d14728_2    conda-forge
glob2                     0.7                        py_0    conda-forge
google-auth               2.6.0              pyh6c4a22f_0    conda-forge
google-auth-oauthlib      0.4.6              pyhd8ed1ab_0    conda-forge
google-pasta              0.2.0              pyh8c360ce_0    conda-forge
greenlet                  1.1.2            py38h885f38d_1    conda-forge
grpcio                    1.43.0           py38he5377a8_0    conda-forge
gym                       0.22.0                   pypi_0    pypi
gym-notices               0.0.4                    pypi_0    pypi
h5py                      2.10.0           py38h5e291fa_0
hdf5                      1.10.4          nompi_hcc15c50_1106    conda-forge
heapdict                  1.0.1                      py_0    conda-forge
html5lib                  1.1                pyh9f0ad1d_0    conda-forge
icc_rt                    2019.0.0             h0cc432a_1
icu                       68.2                 h0e60522_0    conda-forge
idna                      3.3                pyhd8ed1ab_0    conda-forge
imagecodecs               2021.11.20       py38h84a8deb_1    conda-forge
imageio                   2.14.1             pyh239f2a4_0    conda-forge
imagesize                 1.3.0              pyhd8ed1ab_0    conda-forge
importlib-metadata        4.10.1           py38haa244fe_0    conda-forge
importlib_metadata        4.10.1               hd8ed1ab_0    conda-forge
importlib_resources       5.4.0              pyhd8ed1ab_0    conda-forge
inflection                0.5.1              pyh9f0ad1d_0    conda-forge
iniconfig                 1.1.1              pyh9f0ad1d_0    conda-forge
intel-openmp              2022.0.0          h57928b3_3663    conda-forge
intervaltree              3.0.2                      py_0    conda-forge
ipykernel                 6.8.0            py38h595d716_0    conda-forge
ipython                   8.0.1            py38haa244fe_0    conda-forge
ipython-sql               0.3.9           py38h32f6830_1002    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipywidgets                7.6.5              pyhd8ed1ab_0    conda-forge
isort                     5.10.1             pyhd8ed1ab_0    conda-forge
itsdangerous              2.0.1              pyhd8ed1ab_0    conda-forge
jbig                      2.1               h8d14728_2003    conda-forge
jdcal                     1.4.1                      py_0    conda-forge
jedi                      0.18.1           py38haa244fe_0    conda-forge
jinja2                    3.0.3              pyhd8ed1ab_0    conda-forge
jinja2-time               0.2.0                      py_2    conda-forge
joblib                    1.1.0              pyhd8ed1ab_0    conda-forge
jpeg                      9e                   h8ffe710_0    conda-forge
json5                     0.9.5              pyh9f0ad1d_0    conda-forge
jsonschema                4.4.0              pyhd8ed1ab_0    conda-forge
jupyter                   1.0.0            py38haa244fe_7    conda-forge
jupyter_client            6.1.12             pyhd8ed1ab_0    conda-forge
jupyter_console           6.4.0              pyhd8ed1ab_1    conda-forge
jupyter_core              4.9.1            py38haa244fe_1    conda-forge
jupyter_server            1.13.4             pyhd8ed1ab_0    conda-forge
jupyterlab                3.1.7              pyhd3eb1b0_0
jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
jupyterlab_server         2.10.3             pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        1.0.2              pyhd8ed1ab_0    conda-forge
jxrlib                    1.1                  h8ffe710_2    conda-forge
keras                     2.8.0                    pypi_0    pypi
keras-applications        1.0.8                      py_1    conda-forge
keras-preprocessing       1.1.2              pyhd8ed1ab_0    conda-forge
keyring                   23.4.0           py38haa244fe_2    conda-forge
kiwisolver                1.3.2            py38hbd9d945_1    conda-forge
krb5                      1.19.2               h20d022d_3    conda-forge
lazy-object-proxy         1.7.1            py38h294d835_0    conda-forge
lcms2                     2.12                 h2a16943_0    conda-forge
lerc                      3.0                  h0e60522_0    conda-forge
libaec                    1.0.6                h39d44d4_0    conda-forge
libarchive                3.5.2                hb45042f_1    conda-forge
libblas                   3.9.0              12_win64_mkl    conda-forge
libbrotlicommon           1.0.9                h8ffe710_6    conda-forge
libbrotlidec              1.0.9                h8ffe710_6    conda-forge
libbrotlienc              1.0.9                h8ffe710_6    conda-forge
libcblas                  3.9.0              12_win64_mkl    conda-forge
libclang                  13.0.0                   pypi_0    pypi
libcurl                   7.81.0               h789b8ee_0    conda-forge
libdeflate                1.8                  h8ffe710_0    conda-forge
libiconv                  1.16                 he774522_0    conda-forge
liblapack                 3.9.0              12_win64_mkl    conda-forge
liblief                   0.11.5               h0e60522_1    conda-forge
libpng                    1.6.37               h1d00b33_2    conda-forge
libprotobuf               3.19.4               h7755175_0    conda-forge
libsodium                 1.0.18               h8d14728_1    conda-forge
libspatialindex           1.9.3                h39d44d4_4    conda-forge
libssh2                   1.10.0               h680486a_2    conda-forge
libtiff                   4.3.0                hd413186_2    conda-forge
libwebp                   1.2.2                h57928b3_0    conda-forge
libwebp-base              1.2.2                h8ffe710_1    conda-forge
libxml2                   2.9.12               hf5bbc77_1    conda-forge
libxslt                   1.1.33               h65864e5_3    conda-forge
libzlib                   1.2.11            h8ffe710_1013    conda-forge
libzopfli                 1.0.3                h0e60522_0    conda-forge
llvmlite                  0.38.0           py38h57a6900_0    conda-forge
locket                    0.2.0                      py_2    conda-forge
lxml                      4.7.1            py38h292cb97_0    conda-forge
lz4-c                     1.9.3                h8ffe710_1    conda-forge
lzo                       2.10              he774522_1000    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
markdown                  3.3.6              pyhd8ed1ab_0    conda-forge
markupsafe                2.0.1            py38h294d835_1    conda-forge
matplotlib                3.5.1            py38haa244fe_0    conda-forge
matplotlib-base           3.5.1            py38h1f000d6_0    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
mccabe                    0.6.1                      py_1    conda-forge
menuinst                  1.4.16           py38he774522_1
mistune                   0.8.4           py38h294d835_1005    conda-forge
mkl                       2021.4.0           h0e2418a_729    conda-forge
mkl-service               2.4.0            py38h4f8af0f_0    conda-forge
mkl_fft                   1.3.1            py38hf2c5eee_1    conda-forge
mkl_random                1.2.2            py38h60cbd38_0    conda-forge
mock                      4.0.3            py38haa244fe_2    conda-forge
more-itertools            8.12.0             pyhd8ed1ab_0    conda-forge
mpmath                    1.2.1              pyhd8ed1ab_0    conda-forge
msgpack-python            1.0.3            py38hbd9d945_0    conda-forge
msys2-conda-epoch         20160418                      1    conda-forge
multidict                 6.0.2            py38h294d835_0    conda-forge
multipledispatch          0.6.0                      py_0    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
mypy_extensions           0.4.3            py38haa244fe_4    conda-forge
navigator-updater         0.2.1                    py38_0
nbclassic                 0.3.5              pyhd8ed1ab_0    conda-forge
nbclient                  0.5.10             pyhd8ed1ab_1    conda-forge
nbconvert                 6.4.1            py38haa244fe_0    conda-forge
nbformat                  5.1.3              pyhd8ed1ab_0    conda-forge
nest-asyncio              1.5.4              pyhd8ed1ab_0    conda-forge
networkx                  2.6.3              pyhd8ed1ab_1    conda-forge
nltk                      3.6.7              pyhd8ed1ab_0    conda-forge
nose                      1.3.7                   py_1006    conda-forge
notebook                  6.4.8              pyha770c72_0    conda-forge
numba                     0.55.0           py38h5858985_0    conda-forge
numexpr                   2.8.1            py38hb80d3ca_0
numpy                     1.21.2           py38hfca59bb_0
numpy-base                1.21.2           py38h0829f74_0
numpydoc                  1.2                pyhd8ed1ab_0    conda-forge
oauthlib                  3.2.0              pyhd8ed1ab_0    conda-forge
olefile                   0.46               pyh9f0ad1d_1    conda-forge
openjpeg                  2.4.0                hb211442_1    conda-forge
openpyxl                  3.0.9              pyhd8ed1ab_0    conda-forge
openssl                   1.1.1l               h8ffe710_0    conda-forge
opt_einsum                3.3.0              pyhd8ed1ab_1    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pandas                    1.4.0            py38h5d928e2_0    conda-forge
pandoc                    2.17.1.1             h57928b3_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
paramiko                  2.9.2              pyhd8ed1ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
partd                     1.2.0              pyhd8ed1ab_0    conda-forge
path                      16.3.0           py38haa244fe_0    conda-forge
path.py                   12.5.0                        0    conda-forge
pathlib2                  2.3.6            py38haa244fe_1    conda-forge
pathspec                  0.9.0              pyhd8ed1ab_0    conda-forge
patsy                     0.5.2              pyhd8ed1ab_0    conda-forge
pep8                      1.7.1                      py_0    conda-forge
pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    8.4.0            py38h794f750_0    conda-forge
pip                       22.0.3             pyhd8ed1ab_0    conda-forge
pkginfo                   1.8.2              pyhd8ed1ab_0    conda-forge
platformdirs              2.3.0              pyhd8ed1ab_0    conda-forge
pluggy                    1.0.0            py38haa244fe_2    conda-forge
ply                       3.11                       py_1    conda-forge
powershell_shortcut       0.0.1                         3
poyo                      0.5.0                      py_0    conda-forge
prettytable               3.0.0              pyhd8ed1ab_0    conda-forge
prometheus_client         0.13.1             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.26             pyha770c72_0    conda-forge
prompt_toolkit            3.0.26               hd8ed1ab_0    conda-forge
protobuf                  3.19.4           py38h885f38d_0    conda-forge
psutil                    5.9.0            py38h294d835_0    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pulp                      2.5.0                    pypi_0    pypi
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
py                        1.11.0             pyh6c4a22f_0    conda-forge
py-lief                   0.11.5           py38h885f38d_1    conda-forge
pyasn1                    0.4.8                      py_0    conda-forge
pyasn1-modules            0.2.7                      py_0    conda-forge
pycodestyle               2.7.0              pyhd3eb1b0_0
pycosat                   0.6.3           py38h294d835_1009    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pycurl                    7.44.1           py38hdf897c8_1    conda-forge
pydocstyle                6.1.1              pyhd8ed1ab_0    conda-forge
pyerfa                    2.0.0.1          py38h6f4d8f0_1    conda-forge
pyflakes                  2.3.1              pyhd8ed1ab_0    conda-forge
pygments                  2.11.2             pyhd8ed1ab_0    conda-forge
pyjwt                     2.3.0              pyhd8ed1ab_1    conda-forge
pylint                    2.7.2            py38haa244fe_0    conda-forge
pyls-spyder               0.4.0              pyhd8ed1ab_0    conda-forge
pymdptoolbox              4.0b3                    pypi_0    pypi
pymysql                   1.0.2              pyhd8ed1ab_0    conda-forge
pynacl                    1.5.0            py38h31c79cd_0    conda-forge
pyodbc                    4.0.32           py38h885f38d_1    conda-forge
pyopenssl                 22.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.7              pyhd8ed1ab_0    conda-forge
pyqt                      5.12.3           py38haa244fe_8    conda-forge
pyqt-impl                 5.12.3           py38h885f38d_8    conda-forge
pyqt5-sip                 4.19.18          py38h885f38d_8    conda-forge
pyqtchart                 5.12             py38h885f38d_8    conda-forge
pyqtwebengine             5.12.1           py38h885f38d_8    conda-forge
pyreadline                2.1             py38haa244fe_1005    conda-forge
pyrsistent                0.18.1           py38h294d835_0    conda-forge
pysocks                   1.7.1            py38haa244fe_4    conda-forge
pytables                  3.6.1            py38ha5be198_0
pytest                    6.2.5            py38haa244fe_2    conda-forge
python                    3.8.5                h5fd99cc_1
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-libarchive-c       4.0              py38haa244fe_0    conda-forge
python-lsp-black          1.1.0              pyhd8ed1ab_0    conda-forge
python-lsp-jsonrpc        1.0.0              pyhd8ed1ab_0    conda-forge
python-lsp-server         1.2.4              pyhd3eb1b0_0
python-slugify            5.0.2              pyhd8ed1ab_0    conda-forge
python_abi                3.8                      2_cp38    conda-forge
pytz                      2021.3             pyhd8ed1ab_0    conda-forge
pyu2f                     0.1.5              pyhd8ed1ab_0    conda-forge
pywavelets                1.2.0            py38h6f4d8f0_1    conda-forge
pywin32                   303              py38h294d835_0    conda-forge
pywin32-ctypes            0.2.0           py38haa244fe_1004    conda-forge
pywinpty                  2.0.1            py38hd3f51b4_0    conda-forge
pyyaml                    6.0              py38h294d835_3    conda-forge
pyzmq                     22.3.0           py38h09162b1_1    conda-forge
qdarkstyle                3.0.2              pyhd3eb1b0_0
qstylizer                 0.2.1              pyhd8ed1ab_0    conda-forge
qt                        5.12.9               h5909a2a_4    conda-forge
qtawesome                 1.1.1              pyhd8ed1ab_0    conda-forge
qtconsole                 5.2.2              pyhd8ed1ab_1    conda-forge
qtconsole-base            5.2.2              pyhd8ed1ab_1    conda-forge
qtpy                      2.0.1              pyhd8ed1ab_0    conda-forge
regex                     2022.1.18        py38h294d835_0    conda-forge
requests                  2.27.1             pyhd8ed1ab_0    conda-forge
requests-oauthlib         1.3.1              pyhd8ed1ab_0    conda-forge
rope                      0.22.0             pyhd8ed1ab_0    conda-forge
rsa                       4.8                pyhd8ed1ab_0    conda-forge
rtree                     0.9.7            py38h8b54edf_3    conda-forge
ruamel_yaml               0.15.80         py38h294d835_1006    conda-forge
scikit-image              0.19.1           py38h5d928e2_0    conda-forge
scikit-learn              1.0.2            py38hb60ee80_0    conda-forge
scikit-learn-intelex      2021.5.0         py38haa244fe_0    conda-forge
scipy                     1.7.3            py38ha1292f7_0    conda-forge
seaborn                   0.11.2               hd8ed1ab_0    conda-forge
seaborn-base              0.11.2             pyhd8ed1ab_0    conda-forge
send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
setuptools                59.8.0           py38haa244fe_0    conda-forge
simplegeneric             0.8.1                      py_1    conda-forge
singledispatch            3.6.1              pyh44b312d_0    conda-forge
sip                       4.19.25          py38h885f38d_1    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.1.8                ha925a31_3    conda-forge
sniffio                   1.2.0            py38haa244fe_2    conda-forge
snowballstemmer           2.2.0              pyhd8ed1ab_0    conda-forge
sortedcollections         2.1.0              pyhd8ed1ab_0    conda-forge
sortedcontainers          2.4.0              pyhd8ed1ab_0    conda-forge
soupsieve                 2.3.1              pyhd8ed1ab_0    conda-forge
sphinx                    4.4.0              pyh6c4a22f_1    conda-forge
sphinxcontrib             1.0                      py38_1
sphinxcontrib-applehelp   1.0.2                      py_0    conda-forge
sphinxcontrib-devhelp     1.0.2                      py_0    conda-forge
sphinxcontrib-htmlhelp    2.0.0              pyhd8ed1ab_0    conda-forge
sphinxcontrib-jsmath      1.0.1                      py_0    conda-forge
sphinxcontrib-qthelp      1.0.3                      py_0    conda-forge
sphinxcontrib-serializinghtml 1.1.5              pyhd8ed1ab_1    conda-forge
sphinxcontrib-websupport  1.2.4              pyhd8ed1ab_1    conda-forge
spyder                    5.1.5            py38haa95532_1
spyder-kernels            2.1.3            py38haa95532_0
sqlalchemy                1.4.31           py38h294d835_0    conda-forge
sqlite                    3.37.0               h8ffe710_0    conda-forge
sqlparse                  0.4.2              pyhd8ed1ab_0    conda-forge
stack_data                0.1.4              pyhd8ed1ab_0    conda-forge
statsmodels               0.13.1           py38h6f4d8f0_0    conda-forge
sympy                     1.9              py38haa244fe_1    conda-forge
tbb                       2021.5.0             h2d74725_0    conda-forge
tbb4py                    2021.5.0         py38hab090e2_0    conda-forge
tblib                     1.7.0              pyhd8ed1ab_0    conda-forge
tensorboard               2.8.0              pyhd8ed1ab_0    conda-forge
tensorboard-data-server   0.6.0            py38haa244fe_1    conda-forge
tensorboard-plugin-wit    1.8.1              pyhd8ed1ab_0    conda-forge
tensorflow                2.8.0                    pypi_0    pypi
tensorflow-estimator      2.5.0              pyh81a9013_1    conda-forge
tensorflow-io-gcs-filesystem 0.23.1                   pypi_0    pypi
termcolor                 1.1.0                      py_2    conda-forge
terminado                 0.13.1           py38haa244fe_0    conda-forge
testpath                  0.5.0              pyhd8ed1ab_0    conda-forge
text-unidecode            1.3                        py_0    conda-forge
textdistance              4.2.2              pyhd8ed1ab_0    conda-forge
tf-estimator-nightly      2.8.0.dev2021122109          pypi_0    pypi
threadpoolctl             3.1.0              pyh8a188c0_0    conda-forge
three-merge               0.1.1              pyh9f0ad1d_0    conda-forge
tifffile                  2021.11.2          pyhd8ed1ab_0    conda-forge
tinycss                   0.4             pyhd8ed1ab_1002    conda-forge
tinycss2                  1.1.1              pyhd8ed1ab_0    conda-forge
tk                        8.6.11               h8ffe710_1    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tomli                     2.0.0              pyhd8ed1ab_1    conda-forge
toolz                     0.11.2             pyhd8ed1ab_0    conda-forge
tornado                   6.1              py38h294d835_2    conda-forge
tqdm                      4.62.3             pyhd8ed1ab_0    conda-forge
traitlets                 5.1.1              pyhd8ed1ab_0    conda-forge
typed-ast                 1.5.2            py38h294d835_0    conda-forge
typing-extensions         4.0.1                hd8ed1ab_0    conda-forge
typing_extensions         4.0.1              pyha770c72_0    conda-forge
ucrt                      10.0.20348.0         h57928b3_0    conda-forge
ujson                     5.1.0            py38h885f38d_0    conda-forge
unicodecsv                0.14.1                     py_1    conda-forge
unicodedata2              14.0.0           py38h294d835_0    conda-forge
unidecode                 1.3.2              pyhd8ed1ab_0    conda-forge
urllib3                   1.26.8             pyhd8ed1ab_1    conda-forge
vc                        14.2                 hb210afc_6    conda-forge
vs2015_runtime            14.29.30037          h902a5da_6    conda-forge
watchdog                  2.1.6            py38haa244fe_1    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
websocket-client          1.2.3              pyhd8ed1ab_0    conda-forge
werkzeug                  2.0.2              pyhd8ed1ab_0    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
whichcraft                0.6.1                      py_0    conda-forge
widgetsnbextension        3.5.2            py38haa244fe_1    conda-forge
win_inet_pton             1.1.0            py38haa244fe_3    conda-forge
win_unicode_console       0.5             py38haa244fe_1002    conda-forge
wincertstore              0.2             py38haa244fe_1007    conda-forge
winpty                    0.4.3                         4    conda-forge
wrapt                     1.12.1           py38he774522_1
xlrd                      2.0.1              pyhd8ed1ab_3    conda-forge
xlsxwriter                3.0.2              pyhd8ed1ab_0    conda-forge
xlwings                   0.25.3           py38haa244fe_0    conda-forge
xlwt                      1.3.0                      py_1    conda-forge
xmltodict                 0.12.0                     py_0    conda-forge
xz                        5.2.5                h62dcd97_1    conda-forge
yaml                      0.2.5                h8ffe710_2    conda-forge
yapf                      0.32.0             pyhd8ed1ab_0    conda-forge
yarl                      1.7.2            py38h294d835_1    conda-forge
zeromq                    4.3.4                h0e60522_1    conda-forge
zfp                       0.5.5                h0e60522_8    conda-forge
zict                      2.0.0                      py_0    conda-forge
zipp                      3.7.0              pyhd8ed1ab_1    conda-forge
zlib                      1.2.11            h8ffe710_1013    conda-forge
zope                      1.0                      py38_1
zope.event                4.5.0              pyh9f0ad1d_0    conda-forge
zope.interface            5.4.0            py38h294d835_1    conda-forge
zstd                      1.5.2                h6255e5f_0    conda-forge

@ludbri
Copy link
Author

ludbri commented Jun 22, 2022

Now after closing vscode after a few more hours of work I found a total of 23 Python processes and 23 conda processes in the task manager. They all have the same command line:

Python processes: C:\Anaconda3\python.exe "C:\Anaconda3\Scripts\conda-script.py" "run" "-n" "base" "--no-capture-output" "python" "c:\Users\***\.vscode\extensions\ms-python.python-2022.8.0\pythonFiles\get_output_via_markers.py" "c:/Users/***/.vscode/extensions/ms-python.python-2022.8.0/pythonFiles/printEnvVariables.py"
conda processes: C:\Anaconda3\Scripts\conda.exe run -n base --no-capture-output python c:\Users\***\.vscode\extensions\ms-python.python-2022.8.0\pythonFiles\get_output_via_markers.py c:/Users/***/.vscode/extensions/ms-python.python-2022.8.0/pythonFiles/printEnvVariables.py

While working I kept one instance of VScode running where I opened and closed a .py file (without #%%) and two .ipynb files.

I then tried to end all tasks and reopen VScode. I then opened one of the jupyter notebooks and ran a handful of cells and closed VScode. This resulted in 6 python processes left running.

@karrtikr
Copy link

@ludbri Can you please open an issue with https://github.com/conda/conda? I will attempt to temporarily solve this with this issue by not running that specific command, thanks.

@karrtikr karrtikr added investigating We are looking into the cause of the issue and removed info-needed Issue requires more information from poster labels Jun 22, 2022
@karrtikr
Copy link

Can you try setting python.condaPath to "C:\Anaconda3\condabin\conda.bat" in User settings and see if it makes a difference?

@karrtikr karrtikr added the info-needed Issue requires more information from poster label Jun 22, 2022
@ludbri
Copy link
Author

ludbri commented Jun 22, 2022

Update to the previous comment, simply opening and closing an .ipynb file results in 6 sets of rogue processes getting created.

@karrtikr
Copy link

As long as the command line for the processes is the same as the one you mentioned, my temp fix should take care of it. I would still require the above info, thanks.

@ludbri
Copy link
Author

ludbri commented Jun 22, 2022

The issue still persists after changing from "python.condaPath": "C:\\Anaconda3\\Scripts\\conda.exe" to
"python.condaPath": "C:\\Anaconda3\\condabin\\conda.bat". The command line is still the same.

@karrtikr
Copy link

I see, do you think if you can help with creating an issue on conda regarding this? I would do it myself but they require a few more details, you can use the link here https://github.com/conda/conda/issues/new?assignees=&labels=type%3A%3Abug&template=bug-report.yml.

@ludbri
Copy link
Author

ludbri commented Jun 22, 2022

See conda/conda#11569

@karrtikr karrtikr removed the info-needed Issue requires more information from poster label Jun 22, 2022
@karrtikr
Copy link

Thank you.

@karrtikr
Copy link

Temp fix is to revert #18748.

@karrtikr karrtikr removed triage-needed Needs assignment to the proper sub-team investigating We are looking into the cause of the issue labels Jun 22, 2022
@karrtikr karrtikr removed their assignment Jun 22, 2022
@karrtikr karrtikr changed the title Rogue python task left running after closing vscode Rogue conda processes left running after closing vscode (do not use conda run for fetching env variables) Jun 22, 2022
@karrtikr
Copy link

For now you can install an older version of the extension before March as a workaround:

You can follow the prompts from "Extensions: Install Specific Version of Extension..." in the command palette:

image

Or you can open the extensions side bar, click on the settings for the Python extension and pick "Install Another Version...":

https://user-images.githubusercontent.com/51720070/80000627-39dacc00-8472-11ea-9755-ac7ba0acbb70.gif

@ludbri
Copy link
Author

ludbri commented Jun 23, 2022

The issue is no longer present after installing the v2022.0.1814523869 of the python extension.

@github-actions github-actions bot removed the needs PR label Aug 9, 2022
@karrtikr karrtikr added the needs PR Ready to be worked on label Aug 9, 2022
karrtikr pushed a commit that referenced this issue Sep 13, 2022
…ariables (#19819)

Because of conda/conda#11814, `conda activate`
is faster.

Closes #19347 For
#19101
eleanorjboyd pushed a commit to eleanorjboyd/vscode-python that referenced this issue Oct 4, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 14, 2022
wesm pushed a commit to posit-dev/positron that referenced this issue Mar 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug needs PR Ready to be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants