Python Skill
This skill provides access to the user's Python installation located at:
C:\Users\29165\anaconda3\python.exe
画图要支持中文:
2. CHINESE FONT SUPPORT (Critical for Windows)
plt.rcParams['font.sans-serif'] = ['SimHei', 'Microsoft YaHei', 'SimSun', 'Arial'] plt.rcParams['axes.unicode_minus'] = False # Fix minus sign display issue
Instructions
File Organization:
- •Store all raw data files in the
data/directory - •Place all intermediate files and scripts in the
workspace/directory - •Save all final results and outputs to the
result/directory - •This keeps your project organized and makes it easy to clean intermediate files
- •
To execute a Python script file:
code"C:\Users\29165\anaconda3\python.exe" script.py
- •
To run Python code directly:
code"C:\Users\29165\anaconda3\python.exe" -c "print('Hello, world!')" - •
To install Python packages:
code"C:\Users\29165\anaconda3\python.exe" -m pip install package-name
- •
To check Python version:
code"C:\Users\29165\anaconda3\python.exe" --version
- •
To run a Python module:
code"C:\Users\29165\anaconda3\python.exe" -m module_name
Important Notes
- •Always use double quotes around the path in Bash commands:
"C:\Users\29165\anaconda3\python.exe" - •The user's Python installation includes Anaconda, so it has many scientific computing packages pre-installed
- •Use
python.exefor all Python operations (command-line scripts and applications)
Examples
Example 1: Run a script with proper file organization
bash
# Raw data in data/, script in workspace/, output to result/ "C:\Users\29165\anaconda3\python.exe" workspace/data_processor.py --input data/raw_data.csv --output result/processed_data.csv
Example 2: Execute one-liner
bash
"C:\Users\29165\anaconda3\python.exe" -c "import numpy as np; print(np.__version__)"
Example 3: Install package
bash
"C:\Users\29165\anaconda3\python.exe" -m pip install pandas
Example 4: Run Jupyter notebook
bash
"C:\Users\29165\anaconda3\python.exe" -m notebook
When to Use This Skill
- •User asks to run Python code or scripts
- •User needs to install Python packages
- •User wants to check Python version or environment
- •User requests data analysis, machine learning, or scientific computing tasks
- •User needs to execute any Python-based tool or utility