1

I have an evironment set up for QCoDeS

But when I try & install Spyder using conda install, it keeps freezing up even after updating conda. I've tried installing through Navigator but it complains about the Python version (3.10) & doesn't install.

I found a suggestion that installing Spyder with pip install spyder should do the job (yes I know conflicts but I'm running out of options)

Spyder installs and shows up in the list of installed packages but isn't recognized when I enter spyder at the conda command line (W10 x64).

What's going on here? I'm at a loss, should I downgrade the Python version in my environment (how do?)? Is that going to mess with QcoDeS the reason for the envirornment in the first place?

EDIT:: Solution, as mentioned below there are no python 3.10 builds for Spyder so, I deleted the environment & recreated using conda create -n qcodes python=3.9. Spyder now installs & runs in the environment & qcodes happily runs with python 3.9.

DrBwts
  • 3,470
  • 6
  • 38
  • 62

1 Answers1

2

Nothing yet provides Python 3.10 builds for Spyder, however, Conda Forge does offer spyder-kernels builds for 3.10. This would entail creating a separate environment dedicated to hosting only the Spyder infrastructure, and then installing spyder-kernels in the environments you wish to use in Spyder.

That is, something like

## install spyder-kernels in the env of interest
conda install -n myenv -c conda-forge spyder-kernels

## create dedicated env for spyder
conda create -n spyder spyder

## always launch spyder from that env
conda activate spyder
spyder

## switch kernels from GUI

Then follow Spyder documentation to switch to the kernel of interest.

merv
  • 67,214
  • 13
  • 180
  • 245
  • Unfortunately the evironment wont solve (frozen or flexible) & then I'm told the packages aren't available from the `conda-forge` channel – DrBwts Jan 10 '22 at 11:26
  • 1
    Which one of the two environments doesn't solve? `myenv` or `spyder`? – Carlos Cordoba Jan 10 '22 at 22:28
  • @DrBwts if you'd like better resolution on *why* it fails, I've found [`mamba` can help with that](https://stackoverflow.com/q/62288835/570918). – merv Jan 10 '22 at 23:31
  • @CarlosCordoba `myenv` when I try `conda install -n myenv -c conda-forge spyder-kernels` – DrBwts Jan 11 '22 at 14:39
  • What if you simply run `conda install -n myenv spyder-kernels`? – Carlos Cordoba Jan 11 '22 at 17:16
  • @DrBwts without including more details in the question (list packages in environment, show `conda info`, show output of running `conda install ...`), it is difficult to help further. – merv Jan 11 '22 at 18:05
  • recreated the evironment with python 3.9 & its all fine (edited OP) – DrBwts Jan 14 '22 at 12:11