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

can not change to a other python interpreter (Anaconda) #20024

Closed
leavor opened this issue Nov 10, 2022 · 2 comments
Closed

can not change to a other python interpreter (Anaconda) #20024

leavor opened this issue Nov 10, 2022 · 2 comments

Comments

@leavor
Copy link

leavor commented Nov 10, 2022

What steps reproduce the problem?

2022-11-10.16-25-14.mp4
Traceback (most recent call last):
  File "D:\conda\envs\python3.9.13\lib\site-packages\spyder\plugins\ipythonconsole\widgets\client.py", line 768, in _restart_thread_main
    self.shellwidget.kernel_manager.restart_kernel(
  File "D:\conda\envs\python3.9.13\lib\site-packages\jupyter_client\utils.py", line 30, in wrapped
    raise e
  File "D:\conda\envs\python3.9.13\lib\site-packages\jupyter_client\utils.py", line 27, in wrapped
    return loop.run_until_complete(future)
  File "D:\conda\envs\python3.9.13\lib\site-packages\nest_asyncio.py", line 89, in run_until_complete
    return f.result()
  File "D:\conda\envs\python3.9.13\lib\asyncio\futures.py", line 201, in result
    raise self._exception
  File "D:\conda\envs\python3.9.13\lib\asyncio\tasks.py", line 256, in __step
    result = coro.send(None)
  File "D:\conda\envs\python3.9.13\lib\site-packages\jupyter_client\manager.py", line 542, in _async_restart_kernel
    await ensure_async(self.start_kernel(**self._launch_args))
  File "D:\conda\envs\python3.9.13\lib\site-packages\jupyter_client\utils.py", line 30, in wrapped
    raise e
  File "D:\conda\envs\python3.9.13\lib\site-packages\jupyter_client\utils.py", line 27, in wrapped
    return loop.run_until_complete(future)
  File "D:\conda\envs\python3.9.13\lib\site-packages\nest_asyncio.py", line 89, in run_until_complete
    return f.result()
  File "D:\conda\envs\python3.9.13\lib\asyncio\futures.py", line 201, in result
    raise self._exception
  File "D:\conda\envs\python3.9.13\lib\asyncio\tasks.py", line 256, in __step
    result = coro.send(None)
  File "D:\conda\envs\python3.9.13\lib\site-packages\jupyter_client\manager.py", line 83, in wrapper
    raise e
  File "D:\conda\envs\python3.9.13\lib\site-packages\jupyter_client\manager.py", line 75, in wrapper
    out = await method(self, *args, **kwargs)
  File "D:\conda\envs\python3.9.13\lib\site-packages\jupyter_client\manager.py", line 385, in _async_start_kernel
    kernel_cmd, kw = await ensure_async(self.pre_start_kernel(**kw))
  File "D:\conda\envs\python3.9.13\lib\site-packages\jupyter_client\utils.py", line 30, in wrapped
    raise e
  File "D:\conda\envs\python3.9.13\lib\site-packages\jupyter_client\utils.py", line 27, in wrapped
    return loop.run_until_complete(future)
  File "D:\conda\envs\python3.9.13\lib\site-packages\nest_asyncio.py", line 89, in run_until_complete
    return f.result()
  File "D:\conda\envs\python3.9.13\lib\asyncio\futures.py", line 201, in result
    raise self._exception
  File "D:\conda\envs\python3.9.13\lib\asyncio\tasks.py", line 256, in __step
    result = coro.send(None)
  File "D:\conda\envs\python3.9.13\lib\site-packages\jupyter_client\manager.py", line 351, in _async_pre_start_kernel
    kw = await self.provisioner.pre_launch(**kw)
  File "D:\conda\envs\python3.9.13\lib\site-packages\jupyter_client\provisioning\local_provisioner.py", line 193, in pre_launch
    kernel_cmd = km.format_kernel_cmd(
  File "D:\conda\envs\python3.9.13\lib\site-packages\jupyter_client\manager.py", line 261, in format_kernel_cmd
    cmd = self.kernel_spec.argv + extra_arguments
  File "D:\conda\envs\python3.9.13\lib\site-packages\spyder\plugins\ipythonconsole\utils\kernelspec.py", line 107, in argv
    get_conda_activation_script(),
  File "D:\conda\envs\python3.9.13\lib\site-packages\spyder\utils\conda.py", line 76, in get_conda_activation_script
    if osp.basename(exe).startswith('micromamba'):
  File "D:\conda\envs\python3.9.13\lib\ntpath.py", line 216, in basename
    return split(p)[1]
  File "D:\conda\envs\python3.9.13\lib\ntpath.py", line 185, in split
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Versions

  • Spyder version: 5.4.0 (conda)
  • Python version: 3.9.13 64-bit
  • Qt version: 5.15.2
  • PyQt5 version: 5.15.7
  • 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.0.0 (OK)
cookiecutter >=1.6.0          :  1.7.3 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.1.0 (OK)
IPython >=7.31.1;<8.0.0       :  7.31.1 (OK)
jedi >=0.17.2;<0.19.0         :  0.18.1 (OK)
jellyfish >=0.7               :  0.9.0 (OK)
jsonschema >=3.2.0            :  4.4.0 (OK)
keyring >=17.0.0              :  23.4.0 (OK)
nbconvert >=4.0               :  6.4.4 (OK)
numpydoc >=0.6.0              :  1.4.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.11.2 (OK)
pylint >=2.5.0;<3.0           :  2.14.5 (OK)
pylint_venv >=2.1.1           :  2.3.0 (OK)
pyls_spyder >=0.4.0           :  0.4.0 (OK)
pylsp >=1.6.0;<1.7.0          :  1.6.0 (OK)
pylsp_black >=1.2.0           :  1.2.1 (OK)
qdarkstyle >=3.0.2;<3.1.0     :  3.0.2 (OK)
qstylizer >=0.2.2             :  0.2.2 (OK)
qtawesome >=1.2.1             :  1.2.1 (OK)
qtconsole >=5.4.0;<5.5.0      :  5.4.0 (OK)
qtpy >=2.1.0                  :  2.1.0 (OK)
rtree >=0.9.7                 :  0.9.7 (OK)
setuptools >=49.6.0           :  61.2.0 (OK)
sphinx >=0.6.6                :  5.0.2 (OK)
spyder_kernels >=2.4.0;<2.5.0 :  2.4.0 (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                  :  23.2.0 (OK)

# Optional:
cython >=0.21                 :  0.29.32 (OK)
matplotlib >=3.0.0            :  3.4.3 (OK)
numpy >=1.7                   :  1.23.1 (OK)
pandas >=1.1.1                :  1.4.3 (OK)
scipy >=0.17.0                :  1.8.1 (OK)
sympy >=0.7.3                 :  None (NOK)

@ccordoba12
Copy link
Member

Hey @leavor, thanks for reporting. This looks like a very serious issue.

@dalthviz, could you check if you're getting the same problem on Windows?

@ccordoba12
Copy link
Member

I'm going to merge this issue with #20023, as suggested by @dalthviz on that issue, and will try to solve the error generated when trying to detect Micromamba too.

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

3 participants