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

离线模式下Anaconda创建Python3.5环境报错原因咨询

Fixing PackageNotFoundError When Creating Offline Python 3.5 Conda Environment

Hey there, let's break down why you're hitting that error when trying to set up a Python 3.5 environment offline with Conda, and how to fix it.

First, let's recap the error you encountered:

Fetching package metadata ... Solving package specifications: . PackageNotFoundError: Package not found: '' Package missing in current linux-64 channels: - python 3.5*

Why this happens

  • Offline mode only uses local cached packages: When you add the --offline flag, Conda completely stops reaching out to remote channels. It can only pull packages from your local cache (usually stored in ~/anaconda3/pkgs or ~/miniconda3/pkgs). If you never downloaded the Python 3.5 (linux-64) package and its dependencies while online, Conda has nothing to pull from locally.
  • The anaconda spec adds more requirements: Including anaconda in your command tells Conda to install the full Anaconda distribution stack. Even if you had Python 3.5 cached, you might be missing other dependent packages that come with the full Anaconda setup.

Step-by-step fixes

  1. Download all required packages while online first
    Before switching to offline mode, run this command to download every package needed for your environment (without actually creating it yet):

    conda create -n py35 python=3.5 anaconda --download-only
    

    This will pull Python 3.5 and all associated Anaconda packages for your linux-64 system, storing them directly in your Conda package cache.

  2. Double-check your local cache
    Head to your Conda packages directory to confirm the Python 3.5 package exists. Look for files named like python-3.5.*-linux-64.tar.bz2 in:

    ~/anaconda3/pkgs  # Use ~/miniconda3/pkgs if you're using Miniconda
    
  3. Create the environment offline
    Now that all necessary packages are cached, re-run your original offline command—it should work smoothly this time:

    conda create -n py35 python=3.5 anaconda --offline
    
  4. Alternative: Opt for a minimal environment (if full Anaconda isn't needed)
    If you don't require the entire Anaconda distribution, you can create a leaner environment first (fewer packages to cache):

    # Download minimal packages online
    conda create -n py35 python=3.5 --download-only
    # Create environment offline
    conda create -n py35 python=3.5 --offline
    

    You can always add specific packages later (as long as you've cached them) using conda install <package-name> --offline.

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.22 09:42:17