[PR #158] [MERGED] Fix dependency installation issues #578

Closed
opened 2026-03-13 20:58:03 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AJaySi/ALwrity/pull/158
Author: @cypheroxide
Created: 3/4/2025
Status: Merged
Merged: 3/12/2025
Merged by: @AJaySi

Base: mainHead: fix-dependency-installation


📝 Commits (2)

  • 401aa66 Add system prequesisties documentation and installation helper script
  • 8a26fed Add install script info to README and implement error logging in install_dependencies.py

📊 Changes

2 files changed (+192 additions, -0 deletions)

View changed files

📝 README.md (+24 -0)
install_dependencies.py (+168 -0)

📄 Description

Fix dependency installation issues

Issues Encountered

While trying to set up the AI-Writer project across multiple environments (Ubuntu 22.04, PopOS, Arch Linux, Windows 10, Windows 11), I consistently ran into dependency installation failures that weren't documented in the setup instructions. These issues included:

  1. Build failures for packages that require C/C++ compilation due to missing Visual C++ Build Tools on Windows
  2. Failed installations of tiktoken and related packages due to missing Rust compiler
  3. Cascade of dependency conflicts where resolving one issue would trigger another
  4. Lack of clear information about system prerequisites in the documentation

These issues made it extremely difficult for new users to get started with the project, as evidenced by multiple reopened issues on GitHub related to installation problems.

Changes Made

This PR implements several improvements to address these installation issues:

  1. Enhanced documentation: Added a comprehensive "Prerequisites" section to the README that clearly lists all required system dependencies for both Windows and Linux environments.

  2. Installation helper script: Created install_dependencies.py that:

    • Automatically checks for required system dependencies (Python version, Visual C++ Build Tools, Rust compiler)
    • Provides clear, actionable guidance for installing any missing components
    • Offers to set up the virtual environment and install Python dependencies when all prerequisites are met
  3. Explicit installation steps: Updated the installation instructions with clearer, more detailed steps that account for potential issues

How These Changes Address the Issues

These improvements directly address the installation challenges by:

  1. Preventing problems before they occur: By clearly documenting prerequisites and providing automated checks, users will install necessary system components before attempting to install Python dependencies.

  2. Providing clear guidance: When issues do occur, users now have specific instructions for resolving them rather than generic error messages.

  3. Reducing support burden: These changes should significantly reduce the number of "cannot install" issues, allowing more focus on feature development.

  4. Improving user experience: New users will have a much smoother onboarding experience, increasing adoption and community engagement.

  5. Ease of installation for new users: As many new users seem to attempt to use this platform on fresh Windows systems (and some Linux systems), this reduces the burden of coding and debugging knowledge, increasing adoption and streamlining installation processes.

Testing

I've tested these and confirmed changes across multiple environments:

  • Windows 11 with Python 3.12.9
  • Ubuntu 22.04 with Python 3.13.2

In all cases, following the new instructions and using the helper script resulted in successful installation and running of the application.

This PR addresses the issues described in Issue #142 regarding dependency installation problems.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AJaySi/ALwrity/pull/158 **Author:** [@cypheroxide](https://github.com/cypheroxide) **Created:** 3/4/2025 **Status:** ✅ Merged **Merged:** 3/12/2025 **Merged by:** [@AJaySi](https://github.com/AJaySi) **Base:** `main` ← **Head:** `fix-dependency-installation` --- ### 📝 Commits (2) - [`401aa66`](https://github.com/AJaySi/ALwrity/commit/401aa666551c1dee84e644379efe988b017fa0df) Add system prequesisties documentation and installation helper script - [`8a26fed`](https://github.com/AJaySi/ALwrity/commit/8a26fed218fb7e039b7ecc22561f849468ba03b7) Add install script info to README and implement error logging in install_dependencies.py ### 📊 Changes **2 files changed** (+192 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+24 -0) ➕ `install_dependencies.py` (+168 -0) </details> ### 📄 Description # Fix dependency installation issues ## Issues Encountered While trying to set up the AI-Writer project across multiple environments (Ubuntu 22.04, PopOS, Arch Linux, Windows 10, Windows 11), I consistently ran into dependency installation failures that weren't documented in the setup instructions. These issues included: 1. Build failures for packages that require C/C++ compilation due to missing Visual C++ Build Tools on Windows 2. Failed installations of `tiktoken` and related packages due to missing Rust compiler 3. Cascade of dependency conflicts where resolving one issue would trigger another 4. Lack of clear information about system prerequisites in the documentation These issues made it extremely difficult for new users to get started with the project, as evidenced by multiple reopened issues on GitHub related to installation problems. ## Changes Made This PR implements several improvements to address these installation issues: 1. **Enhanced documentation**: Added a comprehensive "Prerequisites" section to the README that clearly lists all required system dependencies for both Windows and Linux environments. 2. **Installation helper script**: Created `install_dependencies.py` that: - Automatically checks for required system dependencies (Python version, Visual C++ Build Tools, Rust compiler) - Provides clear, actionable guidance for installing any missing components - Offers to set up the virtual environment and install Python dependencies when all prerequisites are met 3. **Explicit installation steps**: Updated the installation instructions with clearer, more detailed steps that account for potential issues ## How These Changes Address the Issues These improvements directly address the installation challenges by: 1. **Preventing problems before they occur**: By clearly documenting prerequisites and providing automated checks, users will install necessary system components before attempting to install Python dependencies. 2. **Providing clear guidance**: When issues do occur, users now have specific instructions for resolving them rather than generic error messages. 3. **Reducing support burden**: These changes should significantly reduce the number of "cannot install" issues, allowing more focus on feature development. 4. **Improving user experience**: New users will have a much smoother onboarding experience, increasing adoption and community engagement. 5. **Ease of installation for new users**: As many new users seem to attempt to use this platform on fresh Windows systems (and some Linux systems), this reduces the burden of coding and debugging knowledge, increasing adoption and streamlining installation processes. ## Testing I've tested these and confirmed changes across multiple environments: - Windows 11 with Python 3.12.9 - Ubuntu 22.04 with Python 3.13.2 In all cases, following the new instructions and using the helper script resulted in successful installation and running of the application. ## Related Issues This PR addresses the issues described in [Issue #142 ](https://github.com/AJaySi/AI-Writer/issues/142) regarding dependency installation problems. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-13 20:58:03 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ALwrity#578
No description provided.