如何在新conda环境中启动Spyder?含.yaml环境创建场景
myEnv Hey there! Glad to hear your conda environment is set up and working smoothly. Let’s walk through how to get Spyder launched in your myEnv environment—super straightforward once you know the steps:
Step 1: Activate your
myEnvenvironment
First, make sure you’re operating within your target environment. Open your command line interface and run:# For modern Conda (all operating systems) conda activate myEnv # For older Conda versions or Windows Command Prompt activate myEnvStep 2: Install a Python 2.7-compatible Spyder version
Since your environment uses Python 2.7, keep in mind that Spyder 3.x is the final version that supports Python 2. Install it via Conda to guarantee compatibility with your existing dependencies:conda install spyder=3.3.6 # If the above command fails, try pulling from the conda-forge channel conda install -c conda-forge spyder=3.3.6Step 3: Launch Spyder
Once the installation finishes, just run this command in your activated environment:spyder
Quick Shortcut (Skip Manual Activation)
If you want to launch Spyder directly from your base environment without activating myEnv first, use this one-liner:
conda run -n myEnv spyder
A quick heads-up: Don’t try installing Spyder 4.x or newer here—those versions only support Python 3 and will throw errors in your Python 2.7 environment.
内容的提问来源于stack exchange,提问作者00__00__00

