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

Error message "the system cannot find the path specified" upon trying to start the kernel #22551

Open
meltingSnowdrift opened this issue Sep 22, 2024 · 4 comments · May be fixed by #22575
Open

Comments

@meltingSnowdrift
Copy link

meltingSnowdrift commented Sep 22, 2024

Description

What steps will reproduce the problem?

This problem occurs whenever Spyder tries to start a kernel using a certain Conda environment which I have just created. It does not occur when starting the kernel in another Conda environment: in that other environment, Spyder works normally.

Edit: See the comment below for the rest of the description of this issue.

Versions

  • Spyder version: 6.0.0 (standalone)
  • Python version: 3.11.9 64-bit
  • Qt version: 5.15.8
  • PyQt5 version: 5.15.9
  • Operating System: Windows-10-10.0.22631-SP0

Dependencies

# Mandatory:
aiohttp >=3.9.3                  :  3.10.5 (OK)
asyncssh >=2.14.0,<3.0.0         :  2.17.0 (OK)
atomicwrites >=1.2.0             :  1.4.1 (OK)
chardet >=2.0.0                  :  5.2.0 (OK)
cloudpickle >=0.5.0              :  3.0.0 (OK)
cookiecutter >=1.6.0             :  2.6.0 (OK)
diff_match_patch >=20181111      :  20230430 (OK)
github >=2.3.0                   :  2.4.0 (OK)
importlib_metadata >=4.6.0       :  8.4.0 (OK)
intervaltree >=3.0.2             :  3.1.0 (OK)
IPython >=8.13.0,<9.0.0,!=8.17.1 :  8.27.0 (OK)
jedi >=0.17.2,<0.20.0            :  0.19.1 (OK)
jellyfish >=0.7                  :  1.1.0 (OK)
jsonschema >=3.2.0               :  4.23.0 (OK)
keyring >=17.0.0                 :  25.3.0 (OK)
nbconvert >=4.0                  :  7.16.4 (OK)
numpydoc >=0.6.0                 :  1.8.0 (OK)
parso >=0.7.0,<0.9.0             :  0.8.4 (OK)
pexpect >=4.4.0                  :  4.9.0 (OK)
pickleshare >=0.4                :  0.7.5 (OK)
psutil >=5.3                     :  6.0.0 (OK)
pygments >=2.0                   :  2.18.0 (OK)
pylint >=3.1,<4                  :  3.2.7 (OK)
pylint_venv >=3.0.2              :  3.0.3 (OK)
pyls_spyder >=0.4.0              :  0.4.0 (OK)
pylsp >=1.12.0,<1.13.0           :  1.12.0 (OK)
pylsp_black >=2.0.0,<3.0.0       :  2.0.0 (OK)
pyuca >=1.2                      :  1.2 (OK)
qdarkstyle >=3.2.0,<3.3.0        :  3.2.3 (OK)
qstylizer >=0.2.2                :  0.2.3 (OK)
qtawesome >=1.3.1,<1.4.0         :  1.3.1 (OK)
qtconsole >=5.6.0,<5.7.0         :  5.6.0 (OK)
qtpy >=2.4.0                     :  2.4.1 (OK)
rtree >=0.9.7                    :  1.3.0 (OK)
setuptools >=49.6.0              :  73.0.1 (OK)
sphinx >=0.6.6                   :  8.0.2 (OK)
spyder_kernels >=3.0.0,<3.1.0    :  3.0.0 (OK)
superqt >=0.6.2,<1.0.0           :  0.6.7 (OK)
textdistance >=4.2.0             :  4.6.2 (OK)
three_merge >=0.1.1              :  0.1.1 (OK)
watchdog >=0.10.3                :  5.0.1 (OK)
yarl >=1.9.4                     :  1.9.7 (OK)
zmq >=24.0.0                     :  26.2.0 (OK)

# Optional:
cython >=0.21                    :  3.0.11 (OK)
matplotlib >=3.0.0               :  3.9.2 (OK)
numpy >=1.7                      :  2.1.0 (OK)
pandas >=1.1.1                   :  2.2.2 (OK)
scipy >=0.17.0                   :  1.14.1 (OK)
sympy >=0.7.3                    :  1.13.2 (OK)

Environment

Environment
# packages in environment at C:\Users\Kiki Lu\.conda\envs\computer_vision:
#
# Name                    Version                   Build  Channel
_libavif_api              1.1.1                h57928b3_1    conda-forge
aom                       3.9.1                he0c23c2_0    conda-forge
asttokens                 2.4.1              pyhd8ed1ab_0    conda-forge
blas                      1.0                         mkl    conda-forge
blosc                     1.21.6               h85f69ea_0    conda-forge
brotli                    1.1.0                h2466b09_2    conda-forge
brotli-bin                1.1.0                h2466b09_2    conda-forge
bzip2                     1.0.8                h2466b09_7    conda-forge
c-blosc2                  2.15.1               hb461149_0    conda-forge
ca-certificates           2024.8.30            h56e8100_0    conda-forge
cairo                     1.18.0               h32b962e_3    conda-forge
certifi                   2024.8.30          pyhd8ed1ab_0    conda-forge
charls                    2.4.2                h1537add_0    conda-forge
cloudpickle               3.0.0              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
comm                      0.2.2              pyhd8ed1ab_0    conda-forge
contourpy                 1.3.0           py311h3257749_1    conda-forge
cycler                    0.12.1             pyhd8ed1ab_0    conda-forge
dav1d                     1.2.1                hcfcfb64_0    conda-forge
dcor                      0.6                pyhd8ed1ab_0    conda-forge
debugpy                   1.8.5           py311hda3d55a_1    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
double-conversion         3.3.0                h63175ca_0    conda-forge
exceptiongroup            1.2.2              pyhd8ed1ab_0    conda-forge
executing                 2.1.0              pyhd8ed1ab_0    conda-forge
expat                     2.6.3                he0c23c2_0    conda-forge
ffmpeg                    6.1.2           gpl_h9673905_705    conda-forge
filelock                  3.16.1             pyhd8ed1ab_0    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 h77eed37_2    conda-forge
fontconfig                2.14.2               hbde0cde_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fonttools                 4.53.1          py311he736701_1    conda-forge
freeglut                  3.2.2                he0c23c2_3    conda-forge
freetype                  2.12.1               hdaf720e_2    conda-forge
fsspec                    2024.9.0           pyhff2d567_0    conda-forge
giflib                    5.2.2                h64bf75a_0    conda-forge
graphite2                 1.3.13            h63175ca_1003    conda-forge
harfbuzz                  9.0.0                h2bedf89_1    conda-forge
hdf5                      1.14.3          nompi_h2b43c12_105    conda-forge
icu                       75.1                 he0c23c2_0    conda-forge
imagecodecs               2024.6.1        py311h2672e43_4    conda-forge
imageio                   2.35.1             pyh12aca89_0    conda-forge
imath                     3.1.12               hbb528cf_0    conda-forge
importlib-metadata        8.5.0              pyha770c72_0    conda-forge
intel-openmp              2023.2.0         h57928b3_50497    conda-forge
ipykernel                 6.29.5             pyh4bbf305_0    conda-forge
ipython                   8.27.0             pyh7428d3b_0    conda-forge
jasper                    4.2.4                hcb1a123_0    conda-forge
jedi                      0.19.1             pyhd8ed1ab_0    conda-forge
jinja2                    3.1.4              pyhd8ed1ab_0    conda-forge
joblib                    1.4.2              pyhd8ed1ab_0    conda-forge
jupyter_client            8.6.3              pyhd8ed1ab_0    conda-forge
jupyter_core              5.7.2           py311h1ea47a8_0    conda-forge
jxrlib                    1.1                  hcfcfb64_3    conda-forge
khronos-opencl-icd-loader 2023.04.17           h64bf75a_1    conda-forge
kiwisolver                1.4.7           py311h3257749_0    conda-forge
krb5                      1.21.3               hdf4eb48_0    conda-forge
lazy-loader               0.4                pyhd8ed1ab_1    conda-forge
lazy_loader               0.4                pyhd8ed1ab_1    conda-forge
lcms2                     2.16                 h67d730c_0    conda-forge
lerc                      4.0.0                h63175ca_0    conda-forge
libabseil                 20240116.2      cxx17_he0c23c2_1    conda-forge
libaec                    1.1.3                h63175ca_0    conda-forge
libasprintf               0.22.5               h5728263_3    conda-forge
libavif16                 1.1.1                h4e96d62_1    conda-forge
libblas                   3.9.0              20_win64_mkl    conda-forge
libbrotlicommon           1.1.0                h2466b09_2    conda-forge
libbrotlidec              1.1.0                h2466b09_2    conda-forge
libbrotlienc              1.1.0                h2466b09_2    conda-forge
libcblas                  3.9.0              20_win64_mkl    conda-forge
libclang13                19.1.0          default_ha5278ca_0    conda-forge
libcurl                   8.10.1               h1ee3ff0_0    conda-forge
libdeflate                1.21                 h2466b09_0    conda-forge
libexpat                  2.6.3                he0c23c2_0    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libgettextpo              0.22.5               h5728263_3    conda-forge
libglib                   2.80.3               h7025463_2    conda-forge
libhwloc                  2.11.1          default_h8125262_1000    conda-forge
libiconv                  1.17                 hcfcfb64_2    conda-forge
libintl                   0.22.5               h5728263_3    conda-forge
libjpeg-turbo             3.0.0                hcfcfb64_1    conda-forge
liblapack                 3.9.0              20_win64_mkl    conda-forge
liblapacke                3.9.0              20_win64_mkl    conda-forge
libopencv                 4.10.0          qt6_py311h6a419d0_604    conda-forge
libopenvino               2024.4.0             hfe1841e_0    conda-forge
libopenvino-auto-batch-plugin 2024.4.0             h04f32e0_0    conda-forge
libopenvino-auto-plugin   2024.4.0             h04f32e0_0    conda-forge
libopenvino-hetero-plugin 2024.4.0             h372dad0_0    conda-forge
libopenvino-intel-cpu-plugin 2024.4.0             hfe1841e_0    conda-forge
libopenvino-intel-gpu-plugin 2024.4.0             hfe1841e_0    conda-forge
libopenvino-ir-frontend   2024.4.0             h372dad0_0    conda-forge
libopenvino-onnx-frontend 2024.4.0             hdeef14f_0    conda-forge
libopenvino-paddle-frontend 2024.4.0             hdeef14f_0    conda-forge
libopenvino-pytorch-frontend 2024.4.0             he0c23c2_0    conda-forge
libopenvino-tensorflow-frontend 2024.4.0             h7c40eac_0    conda-forge
libopenvino-tensorflow-lite-frontend 2024.4.0             he0c23c2_0    conda-forge
libopus                   1.3.1                h8ffe710_1    conda-forge
libpng                    1.6.44               h3ca93ac_0    conda-forge
libprotobuf               4.25.3               h503648d_0    conda-forge
libsodium                 1.0.20               hc70643c_0    conda-forge
libsqlite                 3.46.1               h2466b09_0    conda-forge
libssh2                   1.11.0               h7dfc565_0    conda-forge
libtiff                   4.7.0                hb151862_0    conda-forge
libuv                     1.48.0               hcfcfb64_0    conda-forge
libwebp-base              1.4.0                hcfcfb64_0    conda-forge
libxcb                    1.16                 h013a479_1    conda-forge
libxml2                   2.12.7               h0f24e4e_4    conda-forge
libxslt                   1.1.39               h3df6e99_0    conda-forge
libzlib                   1.3.1                h2466b09_1    conda-forge
libzopfli                 1.0.3                h0e60522_0    conda-forge
llvmlite                  0.43.0          py311h7deaa30_1    conda-forge
lz4-c                     1.9.4                hcfcfb64_0    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
markupsafe                2.1.5           py311he736701_1    conda-forge
matplotlib                3.9.2           py311h1ea47a8_1    conda-forge
matplotlib-base           3.9.2           py311h8f1b1e4_1    conda-forge
matplotlib-inline         0.1.7              pyhd8ed1ab_0    conda-forge
mkl                       2023.2.0         h6a75c08_50497    conda-forge
mkl-service               2.4.1           py311h130b7e8_1    conda-forge
mpmath                    1.3.0              pyhd8ed1ab_0    conda-forge
msys2-conda-epoch         20160418                      1    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
nest-asyncio              1.6.0              pyhd8ed1ab_0    conda-forge
networkx                  3.3                pyhd8ed1ab_1    conda-forge
numba                     0.60.0          py311h0673bce_0    conda-forge
numpy                     1.26.4          py311h0b4df5a_0    conda-forge
opencv                    4.10.0          qt6_py311h10c71fe_604    conda-forge
openexr                   3.2.2                h9aba623_2    conda-forge
openh264                  2.4.1                h63175ca_0    conda-forge
openjpeg                  2.5.2                h3d672ee_0    conda-forge
openssl                   3.3.2                h2466b09_0    conda-forge
packaging                 24.1               pyhd8ed1ab_0    conda-forge
pandas                    2.2.3           py311hcf9f919_1    conda-forge
parso                     0.8.4              pyhd8ed1ab_0    conda-forge
pcre2                     10.44                h3d7b363_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    10.4.0          py311h5592be9_1    conda-forge
pip                       24.2               pyh8b19718_1    conda-forge
pixman                    0.43.4               h63175ca_0    conda-forge
platformdirs              4.3.6              pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.47             pyha770c72_0    conda-forge
psutil                    6.0.0           py311he736701_1    conda-forge
pthread-stubs             0.4               hcd874cb_1001    conda-forge
pthreads-win32            2.9.1                hfa6e2cd_3    conda-forge
pugixml                   1.14                 h63175ca_0    conda-forge
pure_eval                 0.2.3              pyhd8ed1ab_0    conda-forge
py-opencv                 4.10.0          qt6_py311h53ff086_604    conda-forge
pygments                  2.18.0             pyhd8ed1ab_0    conda-forge
pynndescent               0.5.13             pyhff2d567_0    conda-forge
pyparsing                 3.1.4              pyhd8ed1ab_0    conda-forge
pyside6                   6.7.2           py311h4238720_3    conda-forge
python                    3.11.10         hce54a09_1_cpython    conda-forge
python-dateutil           2.9.0              pyhd8ed1ab_0    conda-forge
python-tzdata             2024.1             pyhd8ed1ab_0    conda-forge
python_abi                3.11                    5_cp311    conda-forge
pytorch                   2.3.0           cpu_py311he6429e2_1  
pytz                      2024.1             pyhd8ed1ab_0    conda-forge
pywavelets                1.7.0           py311h0a17f05_1    conda-forge
pywin32                   306             py311h12c1d0e_2    conda-forge
pyzmq                     26.2.0          py311h484c95c_2    conda-forge
qhull                     2020.2               hc790b64_5    conda-forge
qt6-main                  6.7.2                hbb46ec1_5    conda-forge
rav1e                     0.6.6                h975169c_2    conda-forge
scikit-image              0.24.0          py311hcf9f919_2    conda-forge
scikit-learn              1.5.2           py311hdcb8d17_1    conda-forge
scipy                     1.14.1          py311hd4686c6_0    conda-forge
setuptools                74.1.2             pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.2.1                h23299a8_0    conda-forge
spyder-kernels            3.0.0           win_pyh7428d3b_0    conda-forge
stack_data                0.6.2              pyhd8ed1ab_0    conda-forge
svt-av1                   2.2.1                he0c23c2_0    conda-forge
sympy                     1.13.2             pyh04b8f61_3    conda-forge
tbb                       2021.13.0            hc790b64_0    conda-forge
threadpoolctl             3.5.0              pyhc1e730c_0    conda-forge
tifffile                  2024.8.30          pyhd8ed1ab_0    conda-forge
tk                        8.6.13               h5226925_1    conda-forge
tornado                   6.4.1           py311he736701_1    conda-forge
tqdm                      4.66.5             pyhd8ed1ab_0    conda-forge
traitlets                 5.14.3             pyhd8ed1ab_0    conda-forge
typing_extensions         4.12.2             pyha770c72_0    conda-forge
tzdata                    2024a                h8827d51_1    conda-forge
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
umap-learn                0.5.6           py311h1ea47a8_1    conda-forge
vc                        14.3                h8a93ad2_21    conda-forge
vc14_runtime              14.40.33810         ha82c5b3_21    conda-forge
vs2015_runtime            14.40.33810         h3bf8584_21    conda-forge
wcwidth                   0.2.13             pyhd8ed1ab_0    conda-forge
wheel                     0.44.0             pyhd8ed1ab_0    conda-forge
x264                      1!164.3095           h8ffe710_2    conda-forge
x265                      3.5                  h2d74725_3    conda-forge
xorg-kbproto              1.0.7             hcd874cb_1002    conda-forge
xorg-libx11               1.8.9                h0076a8d_1    conda-forge
xorg-libxau               1.0.11               hcd874cb_0    conda-forge
xorg-libxdmcp             1.1.3                hcd874cb_0    conda-forge
xorg-xextproto            7.3.0             hcd874cb_1003    conda-forge
xorg-xproto               7.0.31            hcd874cb_1007    conda-forge
xz                        5.2.6                h8d14728_0    conda-forge
zeromq                    4.3.5                he1f189c_5    conda-forge
zfp                       1.0.1                he0c23c2_2    conda-forge
zipp                      3.20.2             pyhd8ed1ab_0    conda-forge
zlib                      1.3.1                h2466b09_1    conda-forge
zlib-ng                   2.2.2                he0c23c2_0    conda-forge
zstd                      1.5.6                h0ea2cb4_0    conda-forge

@meltingSnowdrift
Copy link
Author

Because the Spyder bug report tool does not allow me to attach files, I continue the description of the issue, including attached files, here.

This is the Conda environment for which the problem occurs.
problematic_environment.txt

This is the Conda environment for which the problem does not occur.
good_environment.txt

In the hope that it will be helpful, I have already used debug mode to generate the relevant log files. They are here.
server_python_14752.log
spyder-debug.log
transport_python_14752.log

Potentially relevant evidence and suspected cause

While generating the environment listing files above, something which I suspect to be relevant happened. Upon activating the problematic environment using Mamba, a message was displayed which contained the same error text which had appeared in Spyder, plus what appears to be a fragment of a file path.
Screenshot 2024-09-22 172615

Perhaps relevantly, this file path is cut off at the space character in my user folder name. This distinctly reminds me of certain previous experiences (#21937). Could that space character be causing problems again?

Because the message upon activating the environment in the command line appears to have no direct connection to Spyder, I tried to determine whether the environment itself would work without Spyder. It does appear to work: it is possible, in the affected environment, to start Python, import OpenCV, and correctly run programs previously known to work in that environment on other computers.

@ccordoba12
Copy link
Member

Hey @meltingSnowdrift, thanks for reporting and all the supporting info you collected, that's really important. I find especially significant this part:

While generating the environment listing files above, something which I suspect to be relevant happened. Upon activating the problematic environment using Mamba, a message was displayed which contained the same error text which had appeared in Spyder, plus what appears to be a fragment of a file path.

So, it seems a library in your env (OpenCL) is generating an error message on env activation. The problem is that that message is caught by Spyder (because we activate envs before starting a kernel for them), which shows it as a kernel start error.

Just to be sure, could you post a screenshot of what you're seeing in Spyder when starting a console for that env? Thanks!

@meltingSnowdrift
Copy link
Author

I am quite aware that, if the cause of the problem is a library, and something resembling the problem happens outside Spyder, it is arguable that the problem is not a problem with Spyder. The only reason I reported this as a Spyder issue at all, given the evidence so far, is because it is possible to correctly run Python programs in the affected environment outside Spyder, while it is not possible to do so within Spyder. To the extent that this is a Spyder problem at all, I suspect that it may prove to be about how Spyder handles non-fatal errors from libraries in the environment.

Here is the screenshot you requested.
Screenshot 2024-09-24 172716

@ccordoba12
Copy link
Member

The only reason I reported this as a Spyder issue at all, given the evidence so far, is because it is possible to correctly run Python programs in the affected environment outside Spyder, while it is not possible to do so within Spyder.

Yeah, that's reasonable. Good thing is that we can deal with it on our side.

Here is the screenshot you requested.

Thanks! That's useful too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants