You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
A Python tool that extracts required external dependencies from Python files before execution. Automatically identifies import statements and generates requirements for easy installation.
A Python tool that extracts required external dependencies from Python files before execution. Automatically identifies import statements and generates requirements for easy installation.
Standard Library Detection: Automatically distinguishes between Python standard libraries and external packages
Fallback Parsing: Falls back to regex pattern matching if AST parsing fails
User-Friendly GUI: Simple interface for selecting and analyzing Python files
Instant Results: Shows detected libraries and generates pip install commands
Copy Options: Copy either the full installation command or just library names
Save Results: Export findings to a text file on your desktop
How It Works
Select a Python file using the browse button
Click "ライブラリを検出" (Detect Libraries) to analyze the file
View the list of external dependencies that need to be installed
Use the copy buttons to copy installation commands to clipboard
Optionally save results to a text file
Use Cases
Preparing environment setup for Python projects
Identifying dependencies before deploying applications
Creating requirements.txt files
Setting up virtual environments with necessary packages
Before creating standalone executables with tools like PyInstaller
Installation
No installation required! Simply download the script and run it with Python:
python dependency-extractor.py
Requirements
Python 3.6 or higher
Tkinter (included in standard Python installations)
Standard Library Detection
This tool automatically detects and filters out Python standard libraries from the dependencies list. It includes a comprehensive list of standard libraries from Python 3.6 to 3.13, including:
Core modules (os, sys, re, datetime, etc.)
Data structures and algorithms (collections, heapq, etc.)
File handling (pathlib, csv, json, etc.)
Network and web modules (http, urllib, socket, etc.)
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.
I am not a professional developer or software engineer, just a middle-aged woman who is an IT enthusiast.
This tool was created as a personal project with significant help from Claude's Sonnet 3.5 and 3.7.
If you provide feedback, bug reports, or suggestions, I will sincerely work on improvements with the help of Sonnet and knowledgeable community members.
I would appreciate your cooperation in my learning and growth.
About
A Python tool that extracts required external dependencies from Python files before execution. Automatically identifies import statements and generates requirements for easy installation.