20 KiB
ပြဿနာဖြေရှင်းလမ်းညွှန်
ဒီလမ်းညွှန်မှာ Data Science for Beginners သင်ခန်းစာကို အသုံးပြုရာမှာ ကြုံတွေ့နိုင်တဲ့ ပုံမှန်ပြဿနာများအတွက် ဖြေရှင်းနည်းများကို ပေးထားပါတယ်။
အကြောင်းအရာများ
- Python နှင့် Jupyter ပြဿနာများ
- Package နှင့် Dependency ပြဿနာများ
- Jupyter Notebook ပြဿနာများ
- Quiz Application ပြဿနာများ
- Git နှင့် GitHub ပြဿနာများ
- Docsify Documentation ပြဿနာများ
- Data နှင့် File ပြဿနာများ
- Performance ပြဿနာများ
- အပိုဆောင်းအကူအညီရယူခြင်း
Python နှင့် Jupyter ပြဿနာများ
Python မတွေ့ရှိခြင်း သို့မဟုတ် မမှန်သော Version
ပြဿနာ: python: command not found သို့မဟုတ် မမှန်သော Python version
ဖြေရှင်းနည်း:
# Check Python version
python --version
python3 --version
# If Python 3 is installed as 'python3', create an alias
# On macOS/Linux, add to ~/.bashrc or ~/.zshrc:
alias python=python3
alias pip=pip3
# Or use python3 explicitly
python3 -m pip install jupyter
Windows ဖြေရှင်းနည်း:
- python.org မှ Python ကို ပြန်လည်ထည့်သွင်းပါ
- ထည့်သွင်းစဉ် "Add Python to PATH" ကို အမှန်ခြစ်ပါ
- Terminal/Command Prompt ကို ပြန်လည်စတင်ပါ
Virtual Environment Activation ပြဿနာများ
ပြဿနာ: Virtual environment ကို activate မရခြင်း
ဖြေရှင်းနည်း:
Windows:
# If you get execution policy error
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# Then activate
venv\Scripts\activate
macOS/Linux:
# Ensure the activate script is executable
chmod +x venv/bin/activate
# Then activate
source venv/bin/activate
Activation ကို အတည်ပြုပါ:
# Your prompt should show (venv)
# Check Python location
which python # Should point to venv
Jupyter Kernel ပြဿနာများ
ပြဿနာ: "Kernel not found" သို့မဟုတ် "Kernel keeps dying"
ဖြေရှင်းနည်း:
# Reinstall kernel
python -m ipykernel install --user --name=datascience --display-name="Python (Data Science)"
# Or use the default kernel
python -m ipykernel install --user
# Restart Jupyter
jupyter notebook
ပြဿနာ: Jupyter မှာ Python version မမှန်ခြင်း
ဖြေရှင်းနည်း:
# Install Jupyter in your virtual environment
source venv/bin/activate # Activate first
pip install jupyter ipykernel
# Register the kernel
python -m ipykernel install --user --name=venv --display-name="Python (venv)"
# In Jupyter, select Kernel -> Change kernel -> Python (venv)
Package နှင့် Dependency ပြဿနာများ
Import Errors
ပြဿနာ: ModuleNotFoundError: No module named 'pandas' (သို့မဟုတ် အခြား package များ)
ဖြေရှင်းနည်း:
# Ensure virtual environment is activated
source venv/bin/activate # macOS/Linux
venv\Scripts\activate # Windows
# Install missing package
pip install pandas
# Install all common packages
pip install jupyter pandas numpy matplotlib seaborn scikit-learn
# Verify installation
python -c "import pandas; print(pandas.__version__)"
Pip Installation Failures
ပြဿနာ: pip install မှာ permission error ဖြစ်ခြင်း
ဖြေရှင်းနည်း:
# Use --user flag
pip install --user package-name
# Or use virtual environment (recommended)
python -m venv venv
source venv/bin/activate
pip install package-name
ပြဿနာ: pip install မှာ SSL certificate error ဖြစ်ခြင်း
ဖြေရှင်းနည်း:
# Update pip first
python -m pip install --upgrade pip
# Try installing with trusted host (temporary workaround)
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org package-name
Package Version Conflicts
ပြဿနာ: Package version မကိုက်ညီခြင်း
ဖြေရှင်းနည်း:
# Create fresh virtual environment
python -m venv venv-new
source venv-new/bin/activate # or venv-new\Scripts\activate on Windows
# Install packages with specific versions if needed
pip install pandas==1.3.0
pip install numpy==1.21.0
# Or let pip resolve dependencies
pip install jupyter pandas numpy matplotlib seaborn scikit-learn
Jupyter Notebook ပြဿနာများ
Jupyter မစတင်နိုင်ခြင်း
ပြဿနာ: jupyter notebook command မတွေ့ရှိခြင်း
ဖြေရှင်းနည်း:
# Install Jupyter
pip install jupyter
# Or use python -m
python -m jupyter notebook
# Add to PATH if needed (macOS/Linux)
export PATH="$HOME/.local/bin:$PATH"
Notebook မတင်နိုင်ခြင်း သို့မဟုတ် မသိမ်းနိုင်ခြင်း
ပြဿနာ: "Notebook failed to load" သို့မဟုတ် save error ဖြစ်ခြင်း
ဖြေရှင်းနည်း:
- File permission ကို စစ်ဆေးပါ
# Make sure you have write permissions
ls -l notebook.ipynb
chmod 644 notebook.ipynb # If needed
- File ပျက်စီးမှုကို စစ်ဆေးပါ
# Try opening in text editor to check JSON structure
# Copy content to new notebook if corrupted
- Jupyter cache ကို ရှင်းလင်းပါ
jupyter notebook --clear-cache
Cell မအလုပ်လုပ်နိုင်ခြင်း
ပြဿနာ: Cell "In [*]" မှာ ရပ်နေခြင်း သို့မဟုတ် အချိန်ကြာနေခြင်း
ဖြေရှင်းနည်း:
- Kernel ကို ချိတ်ဆက်ဖြတ်ပါ: "Interrupt" ခလုတ်ကို နှိပ်ပါ သို့မဟုတ်
I, Iကို နှိပ်ပါ - Kernel ကို ပြန်စတင်ပါ: Kernel menu → Restart
- Infinite loop များ ကို စစ်ဆေးပါ
- Output ကို ရှင်းလင်းပါ: Cell → All Output → Clear
Plots မပေါ်ခြင်း
ပြဿနာ: matplotlib plots မပေါ်ခြင်း
ဖြေရှင်းနည်း:
# Add magic command at the top of notebook
%matplotlib inline
import matplotlib.pyplot as plt
# Create plot
plt.plot([1, 2, 3, 4])
plt.show() # Make sure to call show()
Interactive plots အတွက် အခြားနည်းလမ်း:
%matplotlib notebook
# Or
%matplotlib widget
Quiz Application ပြဿနာများ
npm install မအောင်မြင်ခြင်း
ပြဿနာ: npm install မှာ error ဖြစ်ခြင်း
ဖြေရှင်းနည်း:
# Clear npm cache
npm cache clean --force
# Remove node_modules and package-lock.json
rm -rf node_modules package-lock.json
# Reinstall
npm install
# If still failing, try with legacy peer deps
npm install --legacy-peer-deps
Quiz App မစတင်နိုင်ခြင်း
ပြဿနာ: npm run serve မအောင်မြင်ခြင်း
ဖြေရှင်းနည်း:
# Check Node.js version
node --version # Should be 12.x or higher
# Reinstall dependencies
cd quiz-app
rm -rf node_modules package-lock.json
npm install
# Try different port
npm run serve -- --port 8081
Port Already in Use
ပြဿနာ: "Port 8080 is already in use"
ဖြေရှင်းနည်း:
# Find and kill process on port 8080
# macOS/Linux:
lsof -ti:8080 | xargs kill -9
# Windows:
netstat -ano | findstr :8080
taskkill /PID <PID> /F
# Or use a different port
npm run serve -- --port 8081
Quiz မတင်နိုင်ခြင်း သို့မဟုတ် Blank Page
ပြဿနာ: Quiz app တင်နိုင်သော်လည်း Blank Page ပေါ်နေခြင်း
ဖြေရှင်းနည်း:
- Browser console မှာ error ကို စစ်ဆေးပါ (F12)
- Browser cache နှင့် cookies ကို ရှင်းလင်းပါ
- အခြား browser ကို စမ်းသုံးပါ
- JavaScript ကို enable လုပ်ထားပါ
- Ad blocker များက အတားအဆီးဖြစ်နေမရှိကြောင်း စစ်ဆေးပါ
# Rebuild the app
npm run build
npm run serve
Git နှင့် GitHub ပြဿနာများ
Git မမှတ်မိခြင်း
ပြဿနာ: git: command not found
ဖြေရှင်းနည်း:
Windows:
- git-scm.com မှ Git ကို ထည့်သွင်းပါ
- Installation ပြီးလျှင် terminal ကို ပြန်လည်စတင်ပါ
macOS:
မှတ်ချက်: Homebrew မရှိပါက https://brew.sh/ မှာ လမ်းညွှန်ချက်များကို လိုက်နာပြီး Install လုပ်ပါ။
# Install via Homebrew
brew install git
# Or install Xcode Command Line Tools
xcode-select --install
Linux:
sudo apt-get install git # Debian/Ubuntu
sudo dnf install git # Fedora
Clone မအောင်မြင်ခြင်း
ပြဿနာ: git clone မှာ authentication error ဖြစ်ခြင်း
ဖြေရှင်းနည်း:
# Use HTTPS URL
git clone https://github.com/microsoft/Data-Science-For-Beginners.git
# If you have 2FA enabled on GitHub, use Personal Access Token
# Create token at: https://github.com/settings/tokens
# Use token as password when prompted
Permission Denied (publickey)
ပြဿနာ: SSH key authentication မအောင်မြင်ခြင်း
ဖြေရှင်းနည်း:
# Generate SSH key
ssh-keygen -t ed25519 -C "your_email@example.com"
# Add key to ssh-agent
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
# Add public key to GitHub
# Copy key: cat ~/.ssh/id_ed25519.pub
# Add at: https://github.com/settings/keys
Docsify Documentation ပြဿနာများ
Docsify Command မတွေ့ရှိခြင်း
ပြဿနာ: docsify: command not found
ဖြေရှင်းနည်း:
# Install globally
npm install -g docsify-cli
# If permission error on macOS/Linux
sudo npm install -g docsify-cli
# Verify installation
docsify --version
# If still not found, add npm global path
# Find npm global path
npm config get prefix
# Add to PATH (add to ~/.bashrc or ~/.zshrc)
export PATH="$PATH:/usr/local/bin"
Documentation မတင်နိုင်ခြင်း
ပြဿနာ: Docsify serve သော်လည်း content မပေါ်ခြင်း
ဖြေရှင်းနည်း:
# Ensure you're in the repository root
cd Data-Science-For-Beginners
# Check for index.html
ls index.html
# Serve with specific port
docsify serve --port 3000
# Check browser console for errors (F12)
Images မပေါ်ခြင်း
ပြဿနာ: Images မှာ broken link icon ပေါ်နေခြင်း
ဖြေရှင်းနည်း:
- Image path များကို relative ဖြစ်ကြောင်း စစ်ဆေးပါ
- Image file များ repository ထဲမှာ ရှိကြောင်း အတည်ပြုပါ
- Browser cache ကို ရှင်းလင်းပါ
- File extension များကို စစ်ဆေးပါ (အချို့ system များမှာ case-sensitive ဖြစ်သည်)
Data နှင့် File ပြဿနာများ
File မတွေ့ရှိခြင်း
ပြဿနာ: FileNotFoundError data ကို load လုပ်စဉ် ဖြစ်ခြင်း
ဖြေရှင်းနည်း:
import os
# Check current working directory
print(os.getcwd())
# Use absolute path
data_path = os.path.join(os.getcwd(), 'data', 'filename.csv')
df = pd.read_csv(data_path)
# Or use relative path from notebook location
df = pd.read_csv('../data/filename.csv')
# Verify file exists
print(os.path.exists('data/filename.csv'))
CSV Reading Errors
ပြဿနာ: CSV file မဖတ်နိုင်ခြင်း
ဖြေရှင်းနည်း:
import pandas as pd
# Try different encodings
df = pd.read_csv('file.csv', encoding='utf-8')
# or
df = pd.read_csv('file.csv', encoding='latin-1')
# or
df = pd.read_csv('file.csv', encoding='ISO-8859-1')
# Handle missing values
df = pd.read_csv('file.csv', na_values=['NA', 'N/A', ''])
# Specify delimiter if not comma
df = pd.read_csv('file.csv', delimiter=';')
Memory Errors with Large Datasets
ပြဿနာ: MemoryError ใหญ่သော file များကို load လုပ်စဉ် ဖြစ်ခြင်း
ဖြေရှင်းနည်း:
# Read in chunks
chunk_size = 10000
chunks = []
for chunk in pd.read_csv('large_file.csv', chunksize=chunk_size):
# Process chunk
chunks.append(chunk)
df = pd.concat(chunks)
# Or read specific columns only
df = pd.read_csv('file.csv', usecols=['col1', 'col2'])
# Use more efficient data types
df = pd.read_csv('file.csv', dtype={'column_name': 'int32'})
Performance ပြဿနာများ
Notebook အလုပ်လုပ်နှေးခြင်း
ပြဿနာ: Notebook များ အလုပ်လုပ်နှေးခြင်း
ဖြေရှင်းနည်း:
-
Kernel ကို ပြန်စတင်ပြီး output ကို ရှင်းလင်းပါ
- Kernel → Restart & Clear Output
-
အသုံးမပြုသော notebook များကို ပိတ်ပါ
-
Code ကို အဆင့်မြှင့်ပါ:
# Use vectorized operations instead of loops
# Bad:
result = []
for x in data:
result.append(x * 2)
# Good:
result = data * 2 # NumPy/Pandas vectorization
- ใหญသော dataset များကို sample လုပ်ပါ:
# Work with sample during development
df_sample = df.sample(n=1000) # or df.head(1000)
Browser Crash ဖြစ်ခြင်း
ပြဿနာ: Browser crash ဖြစ်ခြင်း သို့မဟုတ် မတုံ့ပြန်ခြင်း
ဖြေရှင်းနည်း:
- အသုံးမပြုသော tab များကို ပိတ်ပါ
- Browser cache ကို ရှင်းလင်းပါ
- Browser memory ကို တိုးမြှင့်ပါ (Chrome:
chrome://settings/system) - JupyterLab ကို အသုံးပြုပါ:
pip install jupyterlab
jupyter lab
အပိုဆောင်းအကူအညီရယူခြင်း
အကူအညီတောင်းရန်မတိုင်မီ
- ဒီ troubleshooting လမ်းညွှန်ကို စစ်ဆေးပါ
- GitHub Issues ကို ရှာဖွေပါ
- INSTALLATION.md နှင့် USAGE.md ကို ပြန်လည်သုံးသပ်ပါ
- Error message ကို အွန်လိုင်းတွင် ရှာဖွေကြည့်ပါ
အကူအညီတောင်းရန် နည်းလမ်း
Issue တစ်ခုဖန်တီးသို့မဟုတ် အကူအညီတောင်းစဉ် အောက်ပါအချက်များကို ထည့်သွင်းပါ:
- Operating System: Windows, macOS, သို့မဟုတ် Linux (distribution ဘယ်ဟာလဲ)
- Python Version:
python --versionကို run လုပ်ပါ - Error Message: Error message အပြည့်အစုံကို ကူးယူပါ
- Steps to Reproduce: Error ဖြစ်မတိုင်မီ ဘာလုပ်ခဲ့လဲ
- What You've Tried: အရင်စမ်းသုံးခဲ့တဲ့ ဖြေရှင်းနည်းများ
ဥပမာ:
**Operating System:** macOS 12.0
**Python Version:** 3.9.7
**Error Message:** ModuleNotFoundError: No module named 'pandas'
**Steps to Reproduce:**
1. Activated virtual environment
2. Started Jupyter notebook
3. Tried to import pandas
**What I've Tried:**
- Ran pip install pandas
- Restarted Jupyter
Community Resources
- GitHub Issues: Issue တစ်ခုဖန်တီးပါ
- Discord: Community ကို Join လုပ်ပါ
- Discussions: GitHub Discussions
- Microsoft Learn: Q&A Forums
ဆက်စပ် Documentation
- INSTALLATION.md - Setup လမ်းညွှန်ချက်များ
- USAGE.md - သင်ခန်းစာကို ဘယ်လိုအသုံးပြုမလဲ
- CONTRIBUTING.md - အထောက်အကူပြုရန် လမ်းညွှန်ချက်
- README.md - Project အကျဉ်းချုပ်
အကြောင်းကြားချက်:
ဤစာရွက်စာတမ်းကို AI ဘာသာပြန်ဝန်ဆောင်မှု Co-op Translator ကို အသုံးပြု၍ ဘာသာပြန်ထားပါသည်။ ကျွန်ုပ်တို့သည် တိကျမှုအတွက် ကြိုးစားနေသော်လည်း အလိုအလျောက် ဘာသာပြန်မှုများတွင် အမှားများ သို့မဟုတ် မမှန်ကန်မှုများ ပါဝင်နိုင်သည်ကို သတိပြုပါ။ မူရင်းဘာသာစကားဖြင့် ရေးသားထားသော စာရွက်စာတမ်းကို အာဏာတရားရှိသော ရင်းမြစ်အဖြစ် သတ်မှတ်သင့်ပါသည်။ အရေးကြီးသော အချက်အလက်များအတွက် လူ့ဘာသာပြန်ပညာရှင်များမှ ပရော်ဖက်ရှင်နယ် ဘာသာပြန်မှုကို အကြံပြုပါသည်။ ဤဘာသာပြန်မှုကို အသုံးပြုခြင်းမှ ဖြစ်ပေါ်လာသော အလွဲအမှားများ သို့မဟုတ် အနားယူမှုများအတွက် ကျွန်ုပ်တို့သည် တာဝန်မယူပါ။