You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在Anaconda Spyder中运行Python代码出现simplekml模块缺失错误求助

Fixing ModuleNotFoundError: No module named 'simplekml' in Spyder (Anaconda Python 3.6)

Hey there! Let's break down why you're hitting this error and how to fix it quickly.

Why this error happens

The simplekml module isn't part of Python's standard library, and it's not pre-installed with Anaconda by default. Your Spyder environment (Python 3.6) just doesn't have the package installed yet—so Python can't find it when you try to import it.

How to install simplekml in your Anaconda environment

You have two easy ways to get this package set up:

Method 1: Use Anaconda Navigator (GUI)

  • Open Anaconda Navigator from your start menu (Windows) or applications folder (Mac/Linux)
  • Switch to the Environments tab (top navigation bar)
  • Select your Python 3.6 environment from the list on the left (it might be named base or a custom name you created)
  • In the search box at the top, type simplekml—the package should show up in the list below
  • Check the box next to simplekml, then click the Apply button in the bottom right to start the installation

Method 2: Use the command line (Anaconda Prompt/Terminal)

If you prefer using the command line:

  1. Open Anaconda Prompt (Windows) or your system's terminal (Mac/Linux)
  2. Activate your Python 3.6 environment first:
    conda activate your-environment-name
    
    Replace your-environment-name with the actual name of your environment (e.g., base if you're using the default Anaconda environment)
  3. Install simplekml using either conda (recommended for Anaconda environments) or pip:
    • Using conda (from the conda-forge channel, since it's not in the default conda repo):
      conda install -c conda-forge simplekml
      
    • If conda doesn't find the package, use pip instead:
      pip install simplekml
      

Important post-install step

After installing the package, restart Spyder. Sometimes Spyder doesn't pick up newly installed packages until you close and reopen it.

Once you've done that, run your code again—it should no longer throw the ModuleNotFoundError!

内容的提问来源于stack exchange,提问作者user9630712

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.29 06:48:31