Skip to content

Miniconda is a lightweight version of Anaconda that helps you quickly install Python and various packages. It's more suitable than the full Anaconda for beginners running AI programs.

This tutorial will guide you step-by-step through installing Miniconda on Windows 10 using the official download link, setting up a Python 3.10 environment, and installing common modules. Don't worry—even if you're a complete beginner, you can easily follow along!


Step 1: Download and Install Miniconda

  1. Download Miniconda

  2. Install Miniconda

    • Double-click the downloaded file to open the installation window.

    • Click "Next," then agree to the license terms by clicking "I Agree."

    • Important: On the "Advanced Options" page, check Add Miniconda3 to my PATH environment variable to enable using the conda command directly. Otherwise, you may encounter the error: conda is not recognized as an internal or external command, operable program, or batch file.

    • Note: Some computers may warn against adding to PATH, but ignore it and check the box anyway. This is a common pitfall for beginners—without it, commands won't work.

  • Click "Install," wait a few minutes, then click "Finish" when done.

Step 2: Verify Installation and Create a Python 3.10 Virtual Environment

  1. Open the Command Line Terminal (CMD)

    • Hold the Windows key + R to open the "Run" window.
    • Type cmd and press Enter to open the black command-line window.
  2. Check if Miniconda is Installed Correctly

    • In the command line, type: conda --version
      Press Enter. If you see something like conda 25.1.1, the installation was successful.

If it says "not recognized as an internal or external command," the environment variable wasn't added. Reinstall and check Add Miniconda3 to my PATH environment variable. 3. Create a Python 3.10 Virtual Environment

  • In the command line, type: conda create -n myai python=3.10
  • myai is the environment name—you can choose any name (e.g., ai_env).
  • After pressing Enter, the system will download Python 3.10 and some base packages. It will ask "Y/N"—type y and press Enter to continue.

  1. Activate the Virtual Environment
    • Type: conda activate myai
      Press Enter. If you see (myai) at the beginning of the command line, you've successfully entered the environment.

  1. Common Virtual Environment Commands
    • Exit the environment: Type conda deactivate and press Enter—the (myai) will disappear.
    • View all environments: Type conda env list to see a list of your environments.
    • Delete an environment (if not needed): Type conda env remove -n myai to remove it.

Step 3: Install Modules and requirements.txt Using pip

  1. Ensure You're in the Virtual Environment

    • Type conda activate myai and confirm (myai) is visible.
  2. Try Installing a Common Module

    • For example, install numpy (a math tool used by many AI programs):
      pip install numpy
      Press Enter. After download and installation, check the version with python -c "import numpy; print(numpy.__version__)".
  3. Install requirements.txt

    • If your AI software provides a requirements.txt file (listing required packages), copy it to a folder (e.g., a new "AIProject" folder on your desktop).
    • Navigate to the folder, delete the address bar content, type cmd, and press Enter to open a terminal window:

  • Then type:
    pip install -r requirements.txt
    Press Enter—it will automatically install all packages listed in the file.

Step 4: Common pip Commands and Error Handling

  1. Common pip Commands

    • Check pip version: pip --version to see if it's up to date.
    • Update pip: If the version is old, type pip install --upgrade pip.
    • List installed packages: pip list to see what's installed.
    • Uninstall a package: For example, pip uninstall numpy to remove it.
  2. Common Errors and Solutions

    • Network errors (slow or failed downloads):
  • It might be a network issue—try again, or use a domestic mirror for speed:
    pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

  • Permission errors (Access Denied):

    • Run CMD as administrator: Right-click the Start menu, select "Command Prompt (Admin)," and try the command again.
  • Dependency conflicts (version incompatibility):

    • If a package conflict occurs, try updating pip (pip install --upgrade pip) and reinstalling. If it persists, check with the software author for recommended versions.
  • Command not working:

    • If pip doesn't work, type python -m ensurepip and python -m pip install --upgrade pip to fix it.

Now Miniconda is installed, the Python 3.10 environment is set up, and you can install any necessary packages. If your AI software has run instructions (e.g., python run.py), enter the command in the virtual environment (with (myai) visible) and give it a try.