Issue
so i'm having some bad issues with my conda installation. I'm running this on MacOS Monterey 12.4
I installed the latest version "Anaconda3-2022.05-MacOSX-x86_64.sh" I then installed an env for spyder.
conda create -n spyder spyder
Everything seems to go ok, however everytime I attempt to run my code I get a spyder internal problem.
Traceback (most recent call last):
File "/Users/person.blank/anaconda3/envs/spyder/lib/python3.9/site-packages/qtconsole/base_frontend_mixin.py", line 138, in _dispatch
handler(msg)
File "/Users/person.blank/anaconda3/envs/spyder/lib/python3.9/site-packages/spyder/plugins/ipythonconsole/widgets/debugging.py", line 278, in _handle_input_request
return super(DebuggingWidget, self)._handle_input_request(msg)
File "/Users/person.blank/anaconda3/envs/spyder/lib/python3.9/site-packages/qtconsole/frontend_widget.py", line 512, in _handle_input_request
self._readline(msg['content']['prompt'], callback=callback, password=msg['content']['password'])
File "/Users/person.blank/anaconda3/envs/spyder/lib/python3.9/site-packages/qtconsole/console_widget.py", line 2422, in _readline
self._show_prompt(prompt, newline=False, separator=False)
TypeError: _show_prompt() got an unexpected keyword argument 'separator'
After this I removed and recreated the spyder env with:-
conda create -n spyder -c conda-forge spyder
When I attempt to launch spyder it never connects to the kernel in IPython Console. So at this point I tried doing another:
conda update --all
This updates the files, but when I launch spyder again I get a missing dependencies.
Mandatory:
qtpy >=2.1.0 : 2.0.1 (NOK)
Should it be this difficult to get anaconda and spyder working? I've always had it working without issue in the past. Anyway any help in solving this would be gratefully appreciated.
Solution
So after research this extensively I thought I would provide the solution that ultimately worked.
To resolve this issue you need to create an env from the conda-forge repo, in order to get the compatible versions of spyder and the spyder kernels.
conda create -n spyder-cf -c conda-forge spyder jupyter_client=7.3.1
So just breaking this down for completeness:-
Creates an env with the name spyder-cf
create -n spyder-cf
Use the conda-forge repo
-c conda-forge
Install spyder and the jupyter client from conda-forge
spyder jupyter_client=7.3.1
Once done you can activate the spyder-cf env and run spyder. However if you wish to use alternative env's then simply create the env you like and open it from spyder. For example, if I want a python 3.10 env I would do the following:
conda create -n env310 -c conda-forge python=3.10 spyder-kernels
It's important to install this from conda-forge so that you get the correct spyder kernel headers.
Change to the spyder-cf env
activate spyder-cf
Activate your python 3.10 env
spyder activate env310
Answered By - blupacetek
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.