1

I need to know how to use Conda to install a Python package within a specific version range. Specifically, I am using Spyder 4.2.1 and I want to use the spyder-kernels package to change to a Python interpreter in another Conda virtual environment. When I do this I get an error message:

Your Python environment or installation doesn't have the spyder‑kernels module or the right version of it installed (>= 1.10.0 and < 1.11.0). Without this module is not possible for Spyder to create a console for you.

You can install it by running in a system terminal:

conda install spyder‑kernels

What I tried was: conda install "spyder-kernels<1.11.0" but it threw an error message.

I found instructions for doing this with pip in this question. However, I never use pip within Conda environments unless I want to dead-end my Conda environment.

merv
  • 67,214
  • 13
  • 180
  • 245
Rich Lysakowski PhD
  • 2,702
  • 31
  • 44

1 Answers1

1

I finally figured it out.

conda install "spyder-kernels>=1.10, <1.11.0"

Then I found an excellent in-depth explanation within another StackOverflow answer that has the specific syntax.

Syntax to conda install a Python package within a specified range

Rich Lysakowski PhD
  • 2,702
  • 31
  • 44