Auto Python Installer
A comprehensive Visual Studio Code extension for managing Python libraries and downloading curated examples for popular Python libraries. This extension simplifies dependency management and provides example scripts to get started quickly.
Table of Contents
Features
1. Scan and Install Missing Libraries
- Automatically scans Python files and workspace to detect missing libraries based on
import statements whenever you save a file (Ctrl+S ).
- Provides options to:
- Install all missing libraries.
- Select specific libraries to install.
- Uses
pip to install the required libraries in the terminal.
2. Download and Extract Example Scripts
- Downloads a ZIP file containing usage examples for 50+ top Python libraries.
- Extracts the contents directly into your workspace.
- Includes examples for libraries like
pandas , numpy , matplotlib , flask , tensorflow , and more.
Installation
From the VS Code Marketplace
- Open Visual Studio Code.
- Navigate to the Extensions view by clicking on the Extensions icon in the Activity Bar or pressing
Ctrl+Shift+X .
- Search for "Auto Python Installer".
- Click Install to add the extension to your VS Code.
Usage
1. Scan and Install Missing Libraries
- Open a Python file or workspace in VS Code.
- Save the file (
Ctrl+S ):
- If missing libraries are detected, the extension will prompt you with installation options.
- Manually Trigger Scan:
- Open the Command Palette (
Ctrl+Shift+P or Cmd+Shift+P on macOS).
- Type "Scan and Install Missing Libraries" and select the command.
- Follow the on-screen prompts:
- Choose to install all missing libraries or select specific ones.
- Monitor installation progress in the integrated terminal.
2. Download and Extract Example Scripts
- Open a folder in VS Code.
- Run the command "Download and Extract Example Scripts" from the Command Palette.
- The extension downloads a ZIP file containing curated examples for popular Python libraries and extracts it into your workspace.
Configuration
Customize the extension's behavior in VS Code settings:
- Go to Settings (
Ctrl+, or Cmd+, on macOS).
- Search for Auto Python Installer.
- Adjust the following options:
- Preferred Package Manager: Specify the package manager (
pip , conda , etc.).
- Auto Install: Enable/disable automatic installation of missing libraries.
Known Issues
- Ensure a workspace folder is opened before running the commands.
- If
pip is not in your system's PATH, installations may fail.
- For ZIP file extraction, the folder must have write permissions.
Submodules and Aliases:
Some Python libraries are submodules or aliases of parent libraries and cannot be installed directly. For example:
mpl_toolkits is part of matplotlib .
sklearn is part of scikit-learn .
cv2 is part of opencv-python .
How the Extension Handles This:
- The extension maps these submodules to their parent libraries and installs the correct parent package. For example:
- If
mpl_toolkits is detected, the extension will install matplotlib .
- If
cv2 is detected, the extension will install opencv-python .
Duplicate Library Names:
In cases where multiple aliases exist for the same library (e.g., PIL vs pillow ), the extension resolves these conflicts programmatically using a predefined mapping.
Incomplete Mappings:
The extension may not cover every possible submodule or alias. If you encounter issues, consider installing the parent library manually or reporting the issue in the project repository.
TopPythonLibraries
Top Python Libraries You Need to Know.
A curated list of Python libraries catering to web development, data analysis, machine learning, and more.
Web Development and Applications
- Taipy: A user-friendly app builder designed for creating front-end GUIs and ML/data pipelines.
- Streamlit: Streamlines the development of web apps for data and machine learning prototypes.
- FastAPI: A modern web framework for building APIs with Python, known for speed and asynchronous support.
- Flask: A lightweight WSGI framework ideal for small web applications.
- Django: A robust web framework offering a complete toolkit for scalable and secure web development.
Core Utilities and Essentials
- Pandas: Provides powerful data structures like DataFrames for data manipulation.
- NumPy: Enables efficient numerical computations with support for arrays and matrices.
- Requests: Simplifies HTTP requests for web scraping and API interaction.
- Termcolor & Colorama: Add color to terminal output, making console applications more user-friendly.
- pyttsx3: A text-to-speech conversion library for building interactive voice-based applications.
Date and Time Management
- DateTime: Standard Python module for basic date and time operations.
- Pendulum: Enhances date and time handling with better time zone support and formatting.
- Arrow: A versatile library for creating, manipulating, and converting date and time objects.
Machine Learning and AI
- Scikit-Learn: A comprehensive machine learning library offering classification, regression, and clustering tools.
- XGBoost: Renowned for its high performance in supervised learning tasks.
- CatBoost: Simplifies handling categorical data in ML models.
- LightGBM: A gradient boosting framework optimized for speed and efficiency.
Deep Learning
- TensorFlow: A robust deep learning framework used for tasks like image recognition and NLP.
- PyTorch: Offers dynamic computation graphs and is favored for its simplicity.
- Keras: A high-level API built on TensorFlow for rapid prototyping.
- OpenCV: A powerful library for computer vision tasks, supporting image and video processing.
Natural Language Processing (NLP)
- NLTK: Comprehensive tools for text processing, including tokenization and classification.
- SpaCy: Streamlined for efficiency, with pre-trained models for language understanding.
- TextBlob: A simple library for NLP tasks like sentiment analysis and text translation.
Data Visualization
- Matplotlib: A foundational plotting library for creating 2D graphs.
- Seaborn: Built on Matplotlib, offering aesthetic statistical graphics.
- Bokeh: For interactive visualizations that are easy to share.
- Vizzu: Specializes in animated storytelling through dynamic graphs.
- Plotly: A versatile library for creating interactive and publication-quality visualizations.
- py_visual_algo: A Python library designed for visualizing and understanding algorithms.
Web Scraping
- Scrapy: A robust framework for web scraping and crawling large datasets.
- Beautiful Soup: A simple library for parsing HTML and XML documents.
- Selenium: Automates browser actions for advanced scraping tasks.
Audio and Speech
- pyttsx3: Converts text to speech for voice-based applications.
- AudioFlux: Facilitates audio signal analysis and deep learning.
- Librosa: For music and audio feature extraction.
Geospatial Analysis
- Geopy: Handles geocoding and calculating distances between geographical locations.
- Folium: Creates interactive maps using Python.
- Geopandas: Extends Pandas to support geospatial data analysis.
Gaming
- Pygame: Facilitates the development of 2D games and multimedia applications.
- Arcade: A modern alternative to Pygame with built-in collision detection.
Automation and Bots
- ChatterBot: Simplifies the creation of conversational bots using machine learning.
- PyAutoGUI: Automates GUI interactions, such as mouse movements and keystrokes.
Distributed Computing
- Dask: Integrates with Pandas and NumPy for large-scale computations.
- PySpark: A Python interface for Apache Spark, ideal for distributed data processing.
- Polars: High-performance DataFrame library optimized for large datasets.
Documentation
- Mkdocs: A lightweight tool for generating project documentation.
- Sphinx: A powerful library for producing documentation in multiple formats.
- Pydoc: Extracts and formats documentation directly from Python modules.
OpenAI and General AI Libraries
A curated list of Python libraries for working with OpenAI's tools and general artificial intelligence development.
- openai: Official Python client for interacting with OpenAI's GPT models and APIs.
- chatassist: A library (based on OpenAI API) for building conversational AI systems with customizable logic and integrations.
- transformers: Hugging Face library for working with transformer-based models like GPT, BERT, and others.
- langchain: Framework for building applications with LLMs using composable chains.
- deepface: A facial recognition and analysis library leveraging deep learning.
- speechrecognition: Library for speech-to-text using APIs like Google Speech API.
- pyttsx3: Text-to-speech conversion library, supporting offline processing.
Our other VS Code Extensions:
- Action Recorder: Capture, replay, and visualize your editor actions with ease. Features multi-session support, advanced replay capabilities, file duplication, new file creation, and customizable workflows to boost productivity.
- Remote Raspberry Pi Connector: Simplifies SSH management, GPIO control, file transfer, and automation for Raspberry Pi devices within VS Code.
- PHP XAMPP Runner: Enables running PHP files on a XAMPP server directly from VS Code with browser integration.
- C/C++/C# Extension: Offers snippets, tutorials, and features to compile and execute C, C++, and C# programs within VS Code.
- Izeh: Provides Python snippets, lessons, and templates for libraries like Tkinter,
colorama , and pyttsx3 , with exercises and solutions.
- ChatGPT: AI Programming Assistant: Leverages OpenAI models for AI-driven code generation, debugging, unit tests, and tutorials within VS Code.
License
This project is licensed under the MIT License.
| |