7.6 KiB
AI-For-Beginners Troubleshooting Guide
This guide helps you resolve common issues encountered while using or contributing to the AI-For-Beginners repository. Each problem includes background, symptoms, explanations, and step-by-step solutions.
Table of Contents
- General Issues
- Installation Issues
- Configuration Issues
- Running Notebooks
- Performance Problems
- Textbook Website Problems
- Contributing Issues
- FAQ
- Getting Help
General Issues
1. Repository Not Cloning Properly
Background: Cloning allows you to copy the repository to your machine.
Symptoms:
- Error:
fatal: repository not found - Error:
Permission denied (publickey)
Possible Causes:
- Incorrect repository URL
- Insufficient permissions
- SSH keys not configured
Solutions:
- Check the repository URL.
Use the HTTPS URL:git clone https://github.com/microsoft/AI-For-Beginners.git - Switch to HTTPS if SSH fails.
If you seePermission denied (publickey), use the HTTPS link above instead of SSH. - Configure SSH keys (optional).
If you want to use SSH, follow GitHub's SSH guide.
Installation Issues
2. Python Environment Issues
Background: The repository relies on Python and various libraries.
Symptoms:
- Error:
ModuleNotFoundError: No module named '<package>' - Import errors when running scripts or notebooks
Possible Causes:
- Dependencies not installed
- Wrong Python version
Solutions:
- Set up a virtual environment.
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate - Install dependencies.
pip install -r requirements.txt - Check Python version.
Use Python 3.7 or newer.python --version
3. Jupyter Not Installed
Background: Notebooks are a core learning resource.
Symptoms:
- Error:
jupyter: command not found - Notebooks fail to launch
Possible Causes:
- Jupyter not installed
Solutions:
- Install Jupyter Notebook.
or, if using Anaconda:pip install notebookconda install notebook - Start Jupyter Notebook.
jupyter notebook
4. Dependency Version Conflicts
Background: Projects can break if package versions are mismatched.
Symptoms:
- Errors or warnings about incompatible versions
Possible Causes:
- Old or conflicting Python packages
Solutions:
- Install in a clean environment.
Delete old venv/conda env and create a new one. - Use exact versions.
Always run:
If this fails, manually install missing packages as described in README.pip install -r requirements.txt
Configuration Issues
5. Environment Variables Not Set
Background: Some modules may require keys, tokens, or config settings.
Symptoms:
- Error:
KeyErroror warnings about missing configuration
Possible Causes:
- Required environment variables not set
Solutions:
- Check for
.env.exampleor similar files. - Create a
.envfile and fill in required values. - Reload your terminal or IDE after setting environment variables.
Running Notebooks
6. Notebook Will Not Open or Run
Background: Jupyter notebooks need proper setup.
Symptoms:
- Notebook fails to launch
- Browser not opening automatically
Possible Causes:
- Jupyter not installed
- Browser configuration issues
Solutions:
- Install Jupyter (see Installation Issues above).
- Open notebooks manually.
- Copy the URL from terminal (e.g.,
http://localhost:8888/?token=...) and paste it into your browser.
- Copy the URL from terminal (e.g.,
7. Kernel Crashing or Freezing
Background: Notebook kernels can crash due to resource limits or code errors.
Symptoms:
- Kernel dies or restarts repeatedly
- Out-of-memory errors
Possible Causes:
- Large datasets
- Incompatible code or packages
Solutions:
- Restart the kernel.
Use the "Restart Kernel" button in Jupyter. - Check memory usage.
Close unused applications. - Run notebooks on cloud platforms.
Use Google Colab or Azure Notebooks.
Performance Problems
8. Notebooks Running Slowly
Background: Some AI tasks require significant memory and CPU.
Symptoms:
- Slow execution
- Laptop fan running loudly
Possible Causes:
- Large datasets or models
- Limited system resources
Solutions:
- Use a cloud platform.
- Upload notebook to Colab or Azure Notebooks.
- Reduce dataset size.
- Use sample data for practice.
- Close unnecessary programs.
- Free up system RAM.
Textbook Website Problems
9. Chapter Not Loading
Background: The online textbook displays lessons and chapters.
Symptoms:
- A chapter (e.g., Transformers/BERT) is missing or not opening
Known Issue:
- Issue #303: “18 Transformers. BERT. can't be opened on the textbook website.” Caused by a filename error (
READMEtransformers.mdinstead ofREADME.md).
Solutions:
- Check for file renaming errors.
If you’re a contributor, ensure chapter files are namedREADME.md. - Report missing files.
Open a GitHub issue with the chapter name and error details.
Contributing Issues
10. PR Not Accepted or Builds Failing
Background: Contributions must pass tests and follow guidelines.
Symptoms:
- Pull request rejected
- CI/CD pipeline errors
Possible Causes:
- Failing tests
- Not following coding standards
Solutions:
- Read the contribution guidelines.
- Follow the repository’s CONTRIBUTING.md.
- Run tests locally before pushing.
- Check for linting rules or formatting requirements.
FAQ
Where can I find help for specific modules?
- Each module usually has its own README. Start there for setup and usage tips.
How do I report a bug or request a feature?
- Open a GitHub Issue with a clear description and steps to reproduce.
Can I ask for help if my problem isn’t listed?
- Yes! Search existing issues first, and if you don’t find your problem, create a new issue.
Getting Help
- Check Issues: GitHub Issues
- Ask Questions: Use GitHub Discussions or open an issue.
- Community: See repository links for chat/forum options.
Last Updated: 2025-09-20
Disclaimer:
This document has been translated using the AI translation service Co-op Translator. While we aim for accuracy, please note that automated translations may contain errors or inaccuracies. The original document in its native language should be regarded as the authoritative source. For critical information, professional human translation is recommended. We are not responsible for any misunderstandings or misinterpretations resulting from the use of this translation.