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

如何安装并启动Jupyter Notebook?安装时pywin32报错及命令未识别求助

Hey there! Let's work through your Jupyter Notebook installation and launch issues step by step:

Fixing Jupyter Notebook Installation & Launch Problems

1. Resolve the pywin32 Version Mismatch Error

The Could not find a version that satisfies the requirement pywin32>=1.0 error usually stems from pip version incompatibility, network issues, or Python version mismatches. Try these fixes:

  • Upgrade pip first
    Outdated pip often fails to detect compatible package versions. Run this command to update it:

    python -m pip install --upgrade pip
    

    If you have multiple Python versions installed, use python3 or py -3 (Windows) instead of python to target the correct one.

  • Install a specific compatible pywin32 version
    Sometimes the latest pywin32 doesn't play nice with your Python version. Try a stable older version like:

    pip install pywin32==227
    

    This version works well with Python 3.6-3.9 on Windows. For newer Python versions, you can test slightly higher versions (e.g., 223 or 230) based on your Python release.

  • Use a domestic pip mirror for faster, more reliable downloads
    Network issues can block package retrieval. Try installing via a Chinese mirror:

    pip install notebook -i https://pypi.tuna.tsinghua.edu.cn/simple
    

2. Fix the 'jupyter' Command Not Recognized Error

This happens when Python's Scripts directory isn't added to your system's environment variables. Here's how to fix it:

  • Locate your Python Scripts directory
    Open Command Prompt and run:

    python -m site --user-site
    

    This will output a path like C:\Users\YourName\AppData\Roaming\Python\Python39\site-packages. Replace site-packages with Scripts to get the correct path (e.g., C:\Users\YourName\AppData\Roaming\Python\Python39\Scripts).

  • Add the path to system environment variables

    1. Right-click "This PC" → "Properties" → "Advanced System Settings" → "Environment Variables"
    2. Under "System Variables", find Path, click "Edit"
    3. Click "New", paste the Scripts directory path, then save all changes
    4. Close and reopen Command Prompt, then try jupyter notebook again.
  • Alternative: Launch directly via Python module
    If you don't want to tweak environment variables, start Jupyter using this command instead:

    python -m notebook
    

If you suspect updates caused the problem, try these steps:

  • Uninstall and reinstall Jupyter components
    Clear out old installations first, then do a fresh install:

    pip uninstall -y jupyter jupyter-core jupyter-notebook notebook
    pip install notebook
    
  • Verify Python version compatibility
    Jupyter Notebook requires Python 3.7 or newer. Check your version with:

    python --version
    

    If you're on an older version, upgrade to a stable supported release.


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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.07 16:48:01