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 changing interpreters #22009

Open
jselwaness opened this issue Apr 20, 2024 · 1 comment
Open

Error changing interpreters #22009

jselwaness opened this issue Apr 20, 2024 · 1 comment

Comments

@jselwaness
Copy link

jselwaness commented Apr 20, 2024

Description

What steps will reproduce the problem?

I changed the interpreter to the path of a python exec in an env I had created
Clicked OK
Restart the kernels and that is when I got this error

Traceback

Traceback (most recent call last):
  File "C:\ProgramData\anaconda3\Lib\site-packages\spyder\plugins\ipythonconsole\widgets\main_widget.py", line 2156, in restart_kernel
    client.restart_kernel()
  File "C:\ProgramData\anaconda3\Lib\site-packages\spyder\plugins\ipythonconsole\widgets\client.py", line 733, in restart_kernel
    if self._abort_kernel_restart():
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\anaconda3\Lib\site-packages\spyder\plugins\ipythonconsole\widgets\client.py", line 335, in _abort_kernel_restart
    if not self.has_spyder_kernels():
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\anaconda3\Lib\site-packages\spyder\plugins\ipythonconsole\widgets\client.py", line 835, in has_spyder_kernels
    has_spyder_kernels = programs.is_module_installed(
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\anaconda3\Lib\site-packages\spyder\utils\programs.py", line 947, in is_module_installed
    output = output and check_version(module_version, ver, symb)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\anaconda3\Lib\site-packages\spyder\utils\programs.py", line 822, in check_version
    return parse(actver) >= parse(version)
           ^^^^^^^^^^^^^
  File "C:\ProgramData\anaconda3\Lib\site-packages\packaging\version.py", line 52, in parse
    return Version(version)
           ^^^^^^^^^^^^^^^^
  File "C:\ProgramData\anaconda3\Lib\site-packages\packaging\version.py", line 198, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: ''

Versions

  • Spyder version: 5.4.3 (conda)
  • Python version: 3.11.7 64-bit
  • Qt version: 5.15.2
  • PyQt5 version: 5.15.10
  • Operating System: Windows 10

Dependencies

# Mandatory:
atomicwrites >=1.2.0                             :  1.4.0 (OK)
chardet >=2.0.0                                  :  4.0.0 (OK)
cloudpickle >=0.5.0                              :  2.2.1 (OK)
cookiecutter >=1.6.0                             :  2.5.0 (OK)
diff_match_patch >=20181111                      :  20200713 (OK)
intervaltree >=3.0.2                             :  3.1.0 (OK)
IPython >=7.31.1,<9.0.0,!=8.8.0,!=8.9.0,!=8.10.0 :  8.20.0 (OK)
jedi >=0.17.2,<0.19.0                            :  0.18.1 (OK)
jellyfish >=0.7                                  :  1.0.1 (OK)
jsonschema >=3.2.0                               :  4.19.2 (OK)
keyring >=17.0.0                                 :  23.13.1 (OK)
nbconvert >=4.0                                  :  7.10.0 (OK)
numpydoc >=0.6.0                                 :  1.5.0 (OK)
paramiko >=2.4.0                                 :  2.8.1 (OK)
parso >=0.7.0,<0.9.0                             :  0.8.3 (OK)
pexpect >=4.4.0                                  :  4.8.0 (OK)
pickleshare >=0.4                                :  0.7.5 (OK)
psutil >=5.3                                     :  5.9.0 (OK)
pygments >=2.0                                   :  2.15.1 (OK)
pylint >=2.5.0,<3.0                              :  2.16.2 (OK)
pylint_venv >=2.1.1                              :  2.3.0 (OK)
pyls_spyder >=0.4.0                              :  0.4.0 (OK)
pylsp >=1.7.2,<1.8.0                             :  1.7.2 (OK)
pylsp_black >=1.2.0                              :  1.2.1 (OK)
qdarkstyle >=3.0.2,<3.2.0                        :  3.0.2 (OK)
qstylizer >=0.2.2                                :  0.2.2 (OK)
qtawesome >=1.2.1                                :  1.2.2 (OK)
qtconsole >=5.4.2,<5.5.0                         :  5.4.2 (OK)
qtpy >=2.1.0                                     :  2.4.1 (OK)
rtree >=0.9.7                                    :  1.0.1 (OK)
setuptools >=49.6.0                              :  68.2.2 (OK)
sphinx >=0.6.6                                   :  5.0.2 (OK)
spyder_kernels >=2.4.3,<2.5.0                    :  2.4.4 (OK)
textdistance >=4.2.0                             :  4.2.1 (OK)
three_merge >=0.1.1                              :  0.1.1 (OK)
watchdog >=0.10.3                                :  2.1.6 (OK)
zmq >=22.1.0                                     :  25.1.2 (OK)

# Optional:
cython >=0.21                                    :  None (NOK)
matplotlib >=3.0.0                               :  3.8.0 (OK)
numpy >=1.7                                      :  1.26.4 (OK)
pandas >=1.1.1                                   :  2.1.4 (OK)
scipy >=0.17.0                                   :  1.11.4 (OK)
sympy >=0.7.3                                    :  1.12 (OK)

Environment

Environment
# packages in environment at C:\Users\username\.conda\envs\env_name:
#
# Name                    Version                   Build  Channel
blas                      1.0                         mkl  
ca-certificates           2024.3.11            haa95532_0  
certifi                   2020.6.20          pyhd3eb1b0_3  
cycler                    0.10.0           py35hcc71164_0  
freetype                  2.12.1               ha860e81_0  
icc_rt                    2022.1.0             h6049295_2  
icu                       58.2                 ha925a31_3  
intel-openmp              2023.1.0         h59b6b97_46320  
jpeg                      9e                   h2bbff1b_1  
kiwisolver                1.0.1            py35h6538335_0  
libpng                    1.6.39               h8cc25b3_0  
matplotlib                3.0.0            py35hd159220_0  
mkl                       2018.0.3                      1  
mkl_fft                   1.0.6            py35hdbbee80_0  
mkl_random                1.0.1            py35h77b88f5_1  
numpy                     1.15.2           py35ha559c80_0  
numpy-base                1.15.2           py35h8128ebf_0  
openssl                   1.1.1w               h2bbff1b_0  
pip                       10.0.1                   py35_0  
pyparsing                 2.4.7              pyhd3eb1b0_0  
pyqt                      5.9.2            py35h6538335_2  
python                    3.5.6                he025d50_0  
python-dateutil           2.8.2              pyhd3eb1b0_0  
pytz                      2021.3             pyhd3eb1b0_0  
qt                        5.9.7            vc14h73c81de_0  
setuptools                40.2.0                   py35_0  
sip                       4.19.8           py35h6538335_0  
six                       1.16.0             pyhd3eb1b0_1  
sqlite                    3.41.2               h2bbff1b_0  
tbb                       2021.8.0             h59b6b97_0  
tbb4py                    2018.0.5         py35he980bc4_0  
tornado                   5.1.1            py35hfa6e2cd_0  
vc                        14.2                 h21ff451_1  
vs2015_runtime            14.27.29016          h5e58377_2  
wheel                     0.37.1             pyhd3eb1b0_0  
wincertstore              0.2              py35hfebbdb8_0  
zlib                      1.2.13               h8cc25b3_0  

@ccordoba12
Copy link
Member

Hey @jselwaness, thanks for reporting. You said:

I changed the interpreter to the path of a python exec in an env I had created

and I have a question for you about that: did you install Spyder-kernels in your environment?

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

No branches or pull requests

2 participants