[GH-ISSUE #142] After following the beginners installation script I got errors #448

Closed
opened 2026-03-13 20:25:47 +03:00 by kerem · 17 comments
Owner

Originally created by @cossil on GitHub (Dec 16, 2024).
Original GitHub issue: https://github.com/AJaySi/ALwrity/issues/142

Originally assigned to: @AJaySi, @uniqueumesh on GitHub.

These are the errors I got. Any idea of what could I have done wrong?
PS C:\ai\alwrity\ai-writer> python alwrity.py
Traceback (most recent call last):
File "C:\ai\alwrity\ai-writer\alwrity.py", line 8, in
from lib.utils.ui_setup import setup_ui
File "C:\ai\alwrity\ai-writer\lib\utils\ui_setup.py", line 4, in
from .content_generators import content_planning_tools, ai_writers
File "C:\ai\alwrity\ai-writer\lib\utils\content_generators.py", line 2, in
from lib.utils.alwrity_utils import (
File "C:\ai\alwrity\ai-writer\lib\utils\alwrity_utils.py", line 7, in
from lib.ai_writers.keywords_to_blog_streamlit import write_blog_from_keywords
File "C:\ai\alwrity\ai-writer\lib\ai_writers\keywords_to_blog_streamlit.py", line 27, in
from ..blog_metadata.get_blog_metadata import blog_metadata
File "C:\ai\alwrity\ai-writer\lib\blog_metadata\get_blog_metadata.py", line 16, in
from google.generativeai import caching
ImportError: cannot import name 'caching' from 'google.generativeai' (C:\Users\cossi\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\generativeai_init_.py)

Originally created by @cossil on GitHub (Dec 16, 2024). Original GitHub issue: https://github.com/AJaySi/ALwrity/issues/142 Originally assigned to: @AJaySi, @uniqueumesh on GitHub. These are the errors I got. Any idea of what could I have done wrong? PS C:\ai\alwrity\ai-writer> python alwrity.py Traceback (most recent call last): File "C:\ai\alwrity\ai-writer\alwrity.py", line 8, in <module> from lib.utils.ui_setup import setup_ui File "C:\ai\alwrity\ai-writer\lib\utils\ui_setup.py", line 4, in <module> from .content_generators import content_planning_tools, ai_writers File "C:\ai\alwrity\ai-writer\lib\utils\content_generators.py", line 2, in <module> from lib.utils.alwrity_utils import ( File "C:\ai\alwrity\ai-writer\lib\utils\alwrity_utils.py", line 7, in <module> from lib.ai_writers.keywords_to_blog_streamlit import write_blog_from_keywords File "C:\ai\alwrity\ai-writer\lib\ai_writers\keywords_to_blog_streamlit.py", line 27, in <module> from ..blog_metadata.get_blog_metadata import blog_metadata File "C:\ai\alwrity\ai-writer\lib\blog_metadata\get_blog_metadata.py", line 16, in <module> from google.generativeai import caching ImportError: cannot import name 'caching' from 'google.generativeai' (C:\Users\cossi\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\generativeai\__init__.py)
kerem 2026-03-13 20:25:47 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@uniqueumesh commented on GitHub (Dec 17, 2024):

Hi, @cossil

Did you follow the steps given in this article? - https://www.alwrity.com/post/getting-started-with-alwrity-ai-writer

To run this script we have to type streamlit run alwrity.py not python alwrity.py

We apologize for not updating our steps guide.

Please check and let us know. Thank you

<!-- gh-comment-id:2547423275 --> @uniqueumesh commented on GitHub (Dec 17, 2024): Hi, @cossil Did you follow the steps given in this article? - https://www.alwrity.com/post/getting-started-with-alwrity-ai-writer To run this script we have to type `streamlit run alwrity.py` not `python alwrity.py` We apologize for not updating our steps guide. Please check and let us know. Thank you
Author
Owner

@cossil commented on GitHub (Dec 17, 2024):

Thank you for the prompt response and for your great work on Alwrity. Yes,
I followed all the steps of the article but I am still having issues to run
it, Here are the errors I am facing:

PS C:\ai\AI-Writer> streamlit run alwrity.py

You can now view your Streamlit app in your browser.

Local URL: http://localhost:8501
Network URL: http://192.168.1.110:8501

2024-12-17 10:46:01.473 Uncaught app execution
Traceback (most recent call last):
File
"C:\Users\cossi\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\runtime\scriptrunner\exec_code.py",
line 88, in exec_func_with_error_handling
result = func()
^^^^^^
File
"C:\Users\cossi\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py",
line 579, in code_to_exec
exec(code, module.dict)
File "C:\Ai\AI-Writer\alwrity.py", line 8, in
from lib.utils.ui_setup import setup_ui
File "C:\ai\AI-Writer\lib\utils\ui_setup.py", line 4, in
from .content_generators import content_planning_tools, ai_writers
File "C:\ai\AI-Writer\lib\utils\content_generators.py", line 2, in

from lib.utils.alwrity_utils import (
File "C:\ai\AI-Writer\lib\utils\alwrity_utils.py", line 7, in
from lib.ai_writers.keywords_to_blog_streamlit import
write_blog_from_keywords
File "C:\ai\AI-Writer\lib\ai_writers\keywords_to_blog_streamlit.py", line
27, in
from ..blog_metadata.get_blog_metadata import blog_metadata
File "C:\ai\AI-Writer\lib\blog_metadata\get_blog_metadata.py", line 16,
in
from google.generativeai import caching
ImportError: cannot import name 'caching' from 'google.generativeai'
(C:\Users\cossi\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\generativeai_init_.py)

By the way, I am running Python version 3.11.4. Is that an issue?

Thank you.

Alexandre
+1(407)433-9073

On Tue, Dec 17, 2024 at 12:23 AM Umesh @.***> wrote:

Hi, @cossil https://github.com/cossil

Did you follow the steps given in this article? -
https://www.alwrity.com/post/getting-started-with-alwrity-ai-writer

To run this script we have to type streamlit run alwrity.py not python
alwrity.py

We apologize for not updating our step guide.

Please check and let us know. Thank you


Reply to this email directly, view it on GitHub
https://github.com/AJaySi/AI-Writer/issues/142#issuecomment-2547423275,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIY5IWHAWOMLIXGOEIVFYT32F6KJLAVCNFSM6AAAAABTXCTLP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBXGQZDGMRXGU
.
You are receiving this because you were mentioned.Message ID:
@.***>

<!-- gh-comment-id:2548527765 --> @cossil commented on GitHub (Dec 17, 2024): Thank you for the prompt response and for your great work on Alwrity. Yes, I followed all the steps of the article but I am still having issues to run it, Here are the errors I am facing: PS C:\ai\AI-Writer> streamlit run alwrity.py You can now view your Streamlit app in your browser. Local URL: http://localhost:8501 Network URL: http://192.168.1.110:8501 2024-12-17 10:46:01.473 Uncaught app execution Traceback (most recent call last): File "C:\Users\cossi\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\runtime\scriptrunner\exec_code.py", line 88, in exec_func_with_error_handling result = func() ^^^^^^ File "C:\Users\cossi\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 579, in code_to_exec exec(code, module.__dict__) File "C:\Ai\AI-Writer\alwrity.py", line 8, in <module> from lib.utils.ui_setup import setup_ui File "C:\ai\AI-Writer\lib\utils\ui_setup.py", line 4, in <module> from .content_generators import content_planning_tools, ai_writers File "C:\ai\AI-Writer\lib\utils\content_generators.py", line 2, in <module> from lib.utils.alwrity_utils import ( File "C:\ai\AI-Writer\lib\utils\alwrity_utils.py", line 7, in <module> from lib.ai_writers.keywords_to_blog_streamlit import write_blog_from_keywords File "C:\ai\AI-Writer\lib\ai_writers\keywords_to_blog_streamlit.py", line 27, in <module> from ..blog_metadata.get_blog_metadata import blog_metadata File "C:\ai\AI-Writer\lib\blog_metadata\get_blog_metadata.py", line 16, in <module> from google.generativeai import caching ImportError: cannot import name 'caching' from 'google.generativeai' (C:\Users\cossi\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\generativeai\__init__.py) By the way, I am running Python version 3.11.4. Is that an issue? Thank you. Alexandre +1(407)433-9073 On Tue, Dec 17, 2024 at 12:23 AM Umesh ***@***.***> wrote: > Hi, @cossil <https://github.com/cossil> > > Did you follow the steps given in this article? - > https://www.alwrity.com/post/getting-started-with-alwrity-ai-writer > > To run this script we have to type streamlit run alwrity.py not python > alwrity.py > > We apologize for not updating our step guide. > > Please check and let us know. Thank you > > — > Reply to this email directly, view it on GitHub > <https://github.com/AJaySi/AI-Writer/issues/142#issuecomment-2547423275>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AIY5IWHAWOMLIXGOEIVFYT32F6KJLAVCNFSM6AAAAABTXCTLP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBXGQZDGMRXGU> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
Author
Owner

@uniqueumesh commented on GitHub (Dec 18, 2024):

Hi, @cossil

Could you let me know if you were able to solve the above error? If not can we do it again from the start? I will help you with the steps.

<!-- gh-comment-id:2551505926 --> @uniqueumesh commented on GitHub (Dec 18, 2024): Hi, @cossil Could you let me know if you were able to solve the above error? If not can we do it again from the start? I will help you with the steps.
Author
Owner

@cossil commented on GitHub (Dec 18, 2024):

Hi Umesh,

Thank you for reaching out again.

Unfortunately, I was not able to solve the error using the provided
information. I would appreciate it if you could guide me through the steps
again. I'm ready to start from the beginning with your assistance.

Best regards,
Alexandre

On Wed, Dec 18, 2024 at 11:46 AM Umesh @.***> wrote:

Hi, @cossil https://github.com/cossil

Could you let me know if you were able to solve the above error? If not
can we do it again from the start? I will help you with the steps.


Reply to this email directly, view it on GitHub
https://github.com/AJaySi/AI-Writer/issues/142#issuecomment-2551505926,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIY5IWDDER6ITJ42LMXXFGL2GGDEZAVCNFSM6AAAAABTXCTLP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNJRGUYDKOJSGY
.
You are receiving this because you were mentioned.Message ID:
@.***>

<!-- gh-comment-id:2552082417 --> @cossil commented on GitHub (Dec 18, 2024): Hi Umesh, Thank you for reaching out again. Unfortunately, I was not able to solve the error using the provided information. I would appreciate it if you could guide me through the steps again. I'm ready to start from the beginning with your assistance. Best regards, Alexandre On Wed, Dec 18, 2024 at 11:46 AM Umesh ***@***.***> wrote: > Hi, @cossil <https://github.com/cossil> > > Could you let me know if you were able to solve the above error? If not > can we do it again from the start? I will help you with the steps. > > — > Reply to this email directly, view it on GitHub > <https://github.com/AJaySi/AI-Writer/issues/142#issuecomment-2551505926>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AIY5IWDDER6ITJ42LMXXFGL2GGDEZAVCNFSM6AAAAABTXCTLP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNJRGUYDKOJSGY> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
Author
Owner

@xiaoyan13 commented on GitHub (Dec 30, 2024):

I also get an error:

(.venv) PS E:\AI-Writer> pip install -r requirements.txt
.... no error here, just a few warnings of version
(.venv) PS E:\AI-Writer> streamlit run alwrity.py

You can now view your Streamlit app in your browser.

Local URL: http://localhost:8502
Network URL: http://192.168.1.102:8502

2024-12-30 16:10:59.650 Uncaught app execution
Traceback (most recent call last):
File "E:\AI-Writer.venv\Lib\site-packages\streamlit\runtime\scriptrunner\exec_code.py", line 88, in exec_func_with_error_handling
result = func()
^^^^^^
File "E:\AI-Writer.venv\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 579, in code_to_exec
exec(code, module.dict)
File "E:\AI-Writer\alwrity.py", line 8, in
from lib.utils.ui_setup import setup_ui
File "E:\AI-Writer\lib\utils\ui_setup.py", line 4, in
from .content_generators import content_planning_tools, ai_writers
File "E:\AI-Writer\lib\utils\content_generators.py", line 2, in
from lib.utils.alwrity_utils import (
File "E:\AI-Writer\lib\utils\alwrity_utils.py", line 8, in
from lib.ai_writers.speech_to_blog.main_audio_to_blog import generate_audio_blog
File "E:\AI-Writer\lib\ai_writers\speech_to_blog\main_audio_to_blog.py", line 8, in
from pytubefix import YouTube
ModuleNotFoundError: No module named 'pytubefix'

By the way, there is no .gitignore in the project, so the git history would be filled with the files under .venv if using virtual environment, same as __pycache__

<!-- gh-comment-id:2565159905 --> @xiaoyan13 commented on GitHub (Dec 30, 2024): I also get an error: (.venv) PS E:\AI-Writer> pip install -r requirements.txt .... no error here, just a few warnings of version (.venv) PS E:\AI-Writer> streamlit run alwrity.py You can now view your Streamlit app in your browser. Local URL: http://localhost:8502 Network URL: http://192.168.1.102:8502 2024-12-30 16:10:59.650 Uncaught app execution Traceback (most recent call last): File "E:\AI-Writer\.venv\Lib\site-packages\streamlit\runtime\scriptrunner\exec_code.py", line 88, in exec_func_with_error_handling result = func() ^^^^^^ File "E:\AI-Writer\.venv\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 579, in code_to_exec exec(code, module.__dict__) File "E:\AI-Writer\alwrity.py", line 8, in <module> from lib.utils.ui_setup import setup_ui File "E:\AI-Writer\lib\utils\ui_setup.py", line 4, in <module> from .content_generators import content_planning_tools, ai_writers File "E:\AI-Writer\lib\utils\content_generators.py", line 2, in <module> from lib.utils.alwrity_utils import ( File "E:\AI-Writer\lib\utils\alwrity_utils.py", line 8, in <module> from lib.ai_writers.speech_to_blog.main_audio_to_blog import generate_audio_blog File "E:\AI-Writer\lib\ai_writers\speech_to_blog\main_audio_to_blog.py", line 8, in <module> from pytubefix import YouTube ModuleNotFoundError: No module named 'pytubefix' By the way, there is no `.gitignore` in the project, so the git history would be filled with the files under `.venv` if using virtual environment, same as `__pycache__`
Author
Owner

@AJaySi commented on GitHub (Dec 31, 2024):

Me and umesh will work on this after the New year Hangover subsides.
Thank you and Happy New year @cossil @xiaoyan13

<!-- gh-comment-id:2566179961 --> @AJaySi commented on GitHub (Dec 31, 2024): Me and umesh will work on this after the New year Hangover subsides. Thank you and Happy New year @cossil @xiaoyan13
Author
Owner

@uniqueumesh commented on GitHub (Jan 2, 2025):

Hi, @xiaoyan13

The error indicates that the Python module pytubefix is not installed or is not accessible in your current environment. Here's how you can resolve the issue:

  1. Verify Module Installation:
  • Open your terminal or command prompt.
  • Check if the module is installed by running: pip show pytubefix
  • If it is not installed, you will see a "WARNING: Package(s) not found" message.
  1. Install the Module:
  • If the module is not installed, you can install it by running: pip install pytubefix

After making these changes, re-run your script: streamlit run alwrity.py

Please check the following steps and let us know if it works. Thank you.

<!-- gh-comment-id:2567328710 --> @uniqueumesh commented on GitHub (Jan 2, 2025): Hi, @xiaoyan13 The error indicates that the Python module `pytubefix` is not installed or is not accessible in your current environment. Here's how you can resolve the issue: 1. Verify Module Installation: - Open your terminal or command prompt. - Check if the module is installed by running: `pip show pytubefix` - If it is not installed, you will see a "WARNING: Package(s) not found" message. 2. Install the Module: - If the module is not installed, you can install it by running: ` pip install pytubefix` After making these changes, re-run your script: `streamlit run alwrity.py` Please check the following steps and let us know if it works. Thank you.
Author
Owner

@AJaySi commented on GitHub (Jan 9, 2025):

@uniqueumesh
please close this issue, if not required anymore. Thanks.

<!-- gh-comment-id:2579211709 --> @AJaySi commented on GitHub (Jan 9, 2025): @uniqueumesh please close this issue, if not required anymore. Thanks.
Author
Owner

@uniqueumesh commented on GitHub (Jan 9, 2025):

I am closing this issue. Thank you

<!-- gh-comment-id:2580156771 --> @uniqueumesh commented on GitHub (Jan 9, 2025): I am closing this issue. Thank you
Author
Owner

@cypheroxide commented on GitHub (Feb 28, 2025):

Reopen: Missing dependencies issue still present across multiple environments

Environment

Description

The previously reported issue regarding missing dependencies needs to be reopened. Despite following the instructions provided in the documentation and previous comments, dependency issues persist.

I've thoroughly tested this across multiple environments, and the same problems occur consistently regardless of the operating system or Python version used.

Steps to Reproduce

  1. Clone the repository: git clone https://github.com/AJaySi/AI-Writer.git
  2. Set up a virtual environment: python -m venv venv and activate it
  3. Install dependencies: pip install -r requirements.txt
  4. Attempt to run the application

Actual Behavior

The installation fails with dependency errors. When attempting to resolve one dependency issue, new errors appear. The specific errors include:

  • Missing dependencies not listed in requirements.txt
  • Version conflicts between packages
  • Incompatible package versions with the Python versions tested
  • Some dependencies can't be found or are included in different versions of packages, such as the SerperDevTool
  • When resolving one dependency issue, new dependency problems emerge in a cascading fashion

The issue persists despite:

  • Using fresh installations
  • Trying different package managers (pip, conda)
  • Manually installing reported missing dependencies

Expected Behavior

The installation process should complete without errors, and the application should run successfully as described in the documentation.

Proposed Solution

  1. Update requirements.txt with all necessary dependencies and their specific versions
  2. Provide clear Python version compatibility information
  3. Consider using a dependency management tool like Poetry to handle package conflicts better
  4. Record a step-by-step video of creating a new development environment, installing all required dependencies, and showing a successful launch of the application
  5. Conduct a thorough audit of the entire codebase to identify all imports and ensure every dependency is properly listed in requirements.txt with appropriate version constraints

I'm happy to provide more detailed error logs if needed or assist with testing potential fixes.

<!-- gh-comment-id:2691309767 --> @cypheroxide commented on GitHub (Feb 28, 2025): # Reopen: Missing dependencies issue still present across multiple environments ## Environment - **Repository**: https://github.com/AJaySi/AI-Writer - **Systems tested**: Ubuntu 22.04, PopOS, Arch Linux, Windows 10, Windows 11 - **Python versions**: 3.13.2, 3.12.1, 3.10 ## Description The previously reported issue regarding missing dependencies needs to be reopened. Despite following the instructions provided in the documentation and previous comments, dependency issues persist. I've thoroughly tested this across multiple environments, and the same problems occur consistently regardless of the operating system or Python version used. ## Steps to Reproduce 1. Clone the repository: `git clone https://github.com/AJaySi/AI-Writer.git` 2. Set up a virtual environment: `python -m venv venv` and activate it 3. Install dependencies: `pip install -r requirements.txt` 4. Attempt to run the application ## Actual Behavior The installation fails with dependency errors. When attempting to resolve one dependency issue, new errors appear. The specific errors include: - Missing dependencies not listed in requirements.txt - Version conflicts between packages - Incompatible package versions with the Python versions tested - Some dependencies can't be found or are included in different versions of packages, such as the SerperDevTool - When resolving one dependency issue, new dependency problems emerge in a cascading fashion The issue persists despite: - Using fresh installations - Trying different package managers (pip, conda) - Manually installing reported missing dependencies ## Expected Behavior The installation process should complete without errors, and the application should run successfully as described in the documentation. ## Proposed Solution 1. Update requirements.txt with all necessary dependencies and their specific versions 2. Provide clear Python version compatibility information 3. Consider using a dependency management tool like Poetry to handle package conflicts better 4. Record a step-by-step video of creating a new development environment, installing all required dependencies, and showing a successful launch of the application 5. Conduct a thorough audit of the entire codebase to identify all imports and ensure every dependency is properly listed in requirements.txt with appropriate version constraints I'm happy to provide more detailed error logs if needed or assist with testing potential fixes.
Author
Owner

@cypheroxide commented on GitHub (Feb 28, 2025):

I've been continuing to troubleshoot this issue and found a potential partial solution.

Additional Required Dependencies

Several development tools are required but not mentioned in the documentation:

  1. Visual Studio Build Tools - Required to build some dependencies from source:

    winget install Microsoft.VisualStudio.2022.BuildTools --silent --override "--wait --quiet --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended"
    
  2. Rust Compiler - Required for tiktoken and possibly other packages:

    # On Windows:
    Invoke-WebRequest -Uri https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe -OutFile rustup-init.exe
    ./rustup-init.exe -y
    
    # On Linux/MacOS:
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
    

I'm still working through the installation process and will update with final results or any additional dependencies and steps, as necessary.

<!-- gh-comment-id:2691426419 --> @cypheroxide commented on GitHub (Feb 28, 2025): I've been continuing to troubleshoot this issue and found a potential partial solution. ## Additional Required Dependencies Several development tools are required but not mentioned in the documentation: 1. **Visual Studio Build Tools** - Required to build some dependencies from source: ``` winget install Microsoft.VisualStudio.2022.BuildTools --silent --override "--wait --quiet --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended" ``` 2. **Rust Compiler** - Required for tiktoken and possibly other packages: ``` # On Windows: Invoke-WebRequest -Uri https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe -OutFile rustup-init.exe ./rustup-init.exe -y # On Linux/MacOS: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y ``` I'm still working through the installation process and will update with final results or any additional dependencies and steps, as necessary.
Author
Owner

@AJaySi commented on GitHub (Mar 1, 2025):

Hello,

Thank you for your efforts. And sorry for the bad installation experience.
We have been working on a webapp SaaS and hoping all this will then go away.
That's no excuse for this sh**ty software.

Request you to please continue updating and I will also help around as when needed.
I will wait for your comments and help merge your changes.

Thank you so much for the help.

<!-- gh-comment-id:2691872094 --> @AJaySi commented on GitHub (Mar 1, 2025): Hello, Thank you for your efforts. And sorry for the bad installation experience. We have been working on a webapp SaaS and hoping all this will then go away. That's no excuse for this sh**ty software. Request you to please continue updating and I will also help around as when needed. I will wait for your comments and help merge your changes. Thank you so much for the help.
Author
Owner

@cypheroxide commented on GitHub (Mar 2, 2025):

Update: Package Installation Failure due to Missing Visual C++ Build Tools

After further investigation of the dependency issues mentioned in my original report, I think I've identified the specific critical dependency.

Issue Description

When attempting to install the required Python dependencies using pip install -r requirements.txt, the installation process first failed because of missing python packages. The logs showed that cached versions of packages were getting pulled, rather than pulling from PyPi or building them correctly. After resolving that by using a Python 3.12.2 virtual environment instead of the latest 3.13.9, it began to fail because of a missing Rust compiler on the systems. I chose to go with rust-up on the Linux systems and Rustlang.Rust.MSVC on Windows 11. After a clean clone of the repository, packages were building and made it further, then failed due to missing Microsoft Visual C++ Build Tools. Specifically, the chroma-hnswlib package could not be built because it requires C++ compilation capabilities that were not available on the system.

Error Message

The following error was encountered during package installation:

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

This occurred while building the wheel for chroma-hnswlib, which is a dependency of chromadb used by various AI/ML packages in our requirements.

Environment Details

  • OS: Windows 11
  • Python: 3.12.9
  • Package manager: pip

Solution

To resolve this issue, Microsoft Visual C++ Build Tools must be installed on the development machine:

  1. Download the Visual Studio Build Tools installer from the official Microsoft website:
    Visual Studio Build Tools

  2. Run the downloaded installer.

  3. In the Visual Studio Installer, select the "Desktop development with C++" workload.

  • This includes the necessary C++ build tools, Windows SDK, and other required components.
  1. Click "Install" to begin the installation process.

  2. After installation completes, restart your computer to ensure all changes take effect.

Option 2: Install Visual Studio Community Edition

If you'd prefer to have the full IDE:

  1. Download Visual Studio Community from:
    Visual Studio Community

  2. During installation, make sure to select the "Desktop development with C++" workload.

  3. Complete the installation and restart your computer.

After Installation

Once the Visual C++ Build Tools are installed, run the following command again to install the dependencies:

pip install -r requirements.txt

This should allow the proper compilation of packages that require C++ extensions.

Additional Notes

  • The Desktop development with C++ workload is approximately a 9.4 GB download.
  • The Visual C++ Build Tools installation requires approximately 1-2 GB of disk space.
  • This is a common requirement for many Python packages that include C/C++ extensions for performance reasons.
  • Once installed, you should be able to build other packages with C++ dependencies in the future without encountering this error again.

I'm continuing to work through other dependency issues and will update with any additional findings. If this ends up being the last hurdle to finish building packages successfully and launches successfully, I will look into to resolving the issue on Linux systems as well and update.

<!-- gh-comment-id:2692548149 --> @cypheroxide commented on GitHub (Mar 2, 2025): # Update: Package Installation Failure due to Missing Visual C++ Build Tools After further investigation of the dependency issues mentioned in my original report, I think I've identified the specific critical dependency. ## Issue Description When attempting to install the required Python dependencies using `pip install -r requirements.txt`, the installation process first failed because of missing python packages. The logs showed that cached versions of packages were getting pulled, rather than pulling from PyPi or building them correctly. After resolving that by using a Python 3.12.2 virtual environment instead of the latest 3.13.9, it began to fail because of a missing Rust compiler on the systems. I chose to go with `rust-up` on the Linux systems and `Rustlang.Rust.MSVC` on Windows 11. After a clean clone of the repository, packages were building and made it further, then failed due to missing Microsoft Visual C++ Build Tools. Specifically, the `chroma-hnswlib` package could not be built because it requires C++ compilation capabilities that were not available on the system. ## Error Message The following error was encountered during package installation: ``` error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ ``` This occurred while building the wheel for `chroma-hnswlib`, which is a dependency of `chromadb` used by various AI/ML packages in our requirements. ## Environment Details - OS: Windows 11 - Python: 3.12.9 - Package manager: pip ## Solution To resolve this issue, Microsoft Visual C++ Build Tools must be installed on the development machine: ### Option 1: Install Visual Studio Build Tools (Recommended) 1. Download the [Visual Studio Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/) installer from the official Microsoft website: [Visual Studio Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/) 2. Run the downloaded installer. 3. In the Visual Studio Installer, select the "Desktop development with C++" workload. - This includes the necessary C++ build tools, Windows SDK, and other required components. 4. Click "Install" to begin the installation process. 5. After installation completes, restart your computer to ensure all changes take effect. ### Option 2: Install [Visual Studio Community](https://visualstudio.microsoft.com/vs/community/) Edition If you'd prefer to have the full IDE: 1. Download Visual Studio Community from: [Visual Studio Community](https://visualstudio.microsoft.com/vs/community/) 2. During installation, make sure to select the "Desktop development with C++" workload. 3. Complete the installation and restart your computer. ## After Installation Once the Visual C++ Build Tools are installed, run the following command again to install the dependencies: ``` pip install -r requirements.txt ``` This should allow the proper compilation of packages that require C++ extensions. ## Additional Notes - The Desktop development with C++ workload is approximately a 9.4 GB download. - The Visual C++ Build Tools installation requires approximately 1-2 GB of disk space. - This is a common requirement for many Python packages that include C/C++ extensions for performance reasons. - Once installed, you should be able to build other packages with C++ dependencies in the future without encountering this error again. I'm continuing to work through other dependency issues and will update with any additional findings. If this ends up being the last hurdle to finish building packages successfully and launches successfully, I will look into to resolving the issue on Linux systems as well and update.
Author
Owner

@AJaySi commented on GitHub (Mar 2, 2025):

Thank you so much. Your detailed work will make this tool adoption easier and save other users tons of time.

1). Most of the failed dependencies are windows and not pip.
Many of the user starting afresh on windows system will face these issues. Its a hurdle for tool adoption.

2). @uniqueumesh fixed this page yesterday, https://github.com/AJaySi/AI-Writer/wiki/Getting-started-with-ALwrity-AI-writer
We will also update wbesite content with your findings. We will also link this issue in the website, useful for others.

3). Request you to please put/pull your findings in this page also, it will also, rightly, make you contributor: https://github.com/AJaySi/AI-Writer/wiki/Getting-started-with-ALwrity-AI-writer

3). I can work on the poertry, but the end user has to install these "prerequisites". Documentation is the way to go for now.
4). Maybe host this on replit or buy a server space, but 'buy'...
Our audience is going to content creators and digital marketeers, who are not as much techy to install these and debug dependency problems as you.

Whats your view on #3 and #4 above for non-tech users ?

<!-- gh-comment-id:2692559475 --> @AJaySi commented on GitHub (Mar 2, 2025): Thank you so much. Your detailed work will make this tool adoption easier and save other users tons of time. 1). Most of the failed dependencies are windows and not pip. Many of the user starting afresh on windows system will face these issues. Its a hurdle for tool adoption. 2). @uniqueumesh fixed this page yesterday, https://github.com/AJaySi/AI-Writer/wiki/Getting-started-with-ALwrity-AI-writer We will also update wbesite content with your findings. We will also link this issue in the website, useful for others. 3). Request you to please put/pull your findings in this page also, it will also, rightly, make you contributor: https://github.com/AJaySi/AI-Writer/wiki/Getting-started-with-ALwrity-AI-writer ----------------------------- 3). I can work on the poertry, but the end user has to install these "prerequisites". Documentation is the way to go for now. 4). Maybe host this on replit or buy a server space, but 'buy'... Our audience is going to content creators and digital marketeers, who are not as much techy to install these and debug dependency problems as you. Whats your view on #3 and #4 above for non-tech users ?
Author
Owner

@cypheroxide commented on GitHub (Mar 4, 2025):

Update: Dependencies Issue Resolved

Summary

I've successfully resolved the previously reported dependency installation issues. This update should provide a comprehensive solution to help other users successfully install the application.

Dependency Installation Issues - RESOLVED

As detailed in my previous updates, the primary dependency issues were caused by missing system components:

  1. Missing Visual C++ Build Tools - Required for building packages with C/C++ extensions
  2. Missing Rust Compiler - Required for the tiktoken package and other components

Complete Installation Steps

For anyone still experiencing dependency installation issues, follow these steps:

Step 1: Install System Dependencies

Windows:

# Install Visual C++ Build Tools
winget install Microsoft.VisualStudio.2022.BuildTools --silent --override "--wait --quiet --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended"

# Install Rust Compiler
Invoke-WebRequest -Uri https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe -OutFile rustup-init.exe
./rustup-init.exe -y

Linux:

# Install C/C++ compiler and development tools (It includes essential tools like the GNU C and C++ compilers (gcc and g++), make, and other development libraries)
# Ubuntu/Debian based distros
sudo apt update
sudo apt install build-essential python3-dev

# Arch and other Arch-based distros
sudo pacman -Syu
sudo pacman -S base-devel cmake make gcc

# Install Rust Compiler
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env

Step 2: Create and Activate Virtual Environment

python -m venv venv
# On Windows
venv\Scripts\activate
# On Linux/MacOS
source venv/bin/activate

Step 3: Update Pip and Install Dependencies

python -m pip install --upgrade pip
# On Windows
pip install -U pip
# On Linux/MacOS
pip install -r requirements.txt

Next Steps

After successfully installing all dependencies, I was able to get the application to build properly. I did encounter a separate NumPy-related import error when running the application, but I'll be filing that as a separate issue since it's unrelated to the dependency installation process.

  1. Update requirements.txt with specific package versions to prevent dependency conflicts as some versions of packages are incompatible with newer versions of others.
  2. Add explicit documentation about system prerequisites (Visual C++ Build Tools, Rust)
  3. Consider adding a setup script that checks for required system dependencies before installation
  4. Include troubleshooting steps for common errors in the README

Environment Details

I've successfully tested this solution on Windows 11 with Python 3.12.9, as well as on Arch Linux, Ubuntu 22.04, and PopOS. If anyone is still experiencing issues with dependency installation, please let me know in the comments or reach out to me however is most convenient.

<!-- gh-comment-id:2696093992 --> @cypheroxide commented on GitHub (Mar 4, 2025): # Update: Dependencies Issue Resolved ## Summary I've successfully resolved the previously reported dependency installation issues. This update should provide a comprehensive solution to help other users successfully install the application. ## Dependency Installation Issues - RESOLVED As detailed in my previous updates, the primary dependency issues were caused by missing system components: 1. **Missing Visual C++ Build Tools** - Required for building packages with C/C++ extensions 2. **Missing Rust Compiler** - Required for the tiktoken package and other components ### Complete Installation Steps For anyone still experiencing dependency installation issues, follow these steps: #### Step 1: Install System Dependencies **Windows:** ```powershell # Install Visual C++ Build Tools winget install Microsoft.VisualStudio.2022.BuildTools --silent --override "--wait --quiet --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended" # Install Rust Compiler Invoke-WebRequest -Uri https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe -OutFile rustup-init.exe ./rustup-init.exe -y ``` **Linux:** ```bash # Install C/C++ compiler and development tools (It includes essential tools like the GNU C and C++ compilers (gcc and g++), make, and other development libraries) # Ubuntu/Debian based distros sudo apt update sudo apt install build-essential python3-dev # Arch and other Arch-based distros sudo pacman -Syu sudo pacman -S base-devel cmake make gcc # Install Rust Compiler curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y source $HOME/.cargo/env ``` #### Step 2: Create and Activate Virtual Environment ```bash python -m venv venv # On Windows venv\Scripts\activate # On Linux/MacOS source venv/bin/activate ``` #### Step 3: Update Pip and Install Dependencies ```bash python -m pip install --upgrade pip # On Windows pip install -U pip # On Linux/MacOS pip install -r requirements.txt ``` ## Next Steps After successfully installing all dependencies, I was able to get the application to build properly. I did encounter a separate NumPy-related import error when running the application, but I'll be filing that as a separate issue since it's unrelated to the dependency installation process. ## Recommended Actions for Repository Maintainers 1. **Update requirements.txt** with specific package versions to prevent dependency conflicts as some versions of packages are incompatible with newer versions of others. 2. **Add explicit documentation** about system prerequisites (Visual C++ Build Tools, Rust) 3. **Consider adding a setup script** that checks for required system dependencies before installation 4. **Include troubleshooting steps** for common errors in the README ## Environment Details - OS: Windows 11 - Python: 3.12.9 - Repository: https://github.com/AJaySi/AI-Writer I've successfully tested this solution on Windows 11 with Python 3.12.9, as well as on Arch Linux, Ubuntu 22.04, and PopOS. If anyone is still experiencing issues with dependency installation, please let me know in the comments or reach out to me however is most convenient.
Author
Owner

@AJaySi commented on GitHub (Mar 4, 2025):

Thank you.
@uniqueumesh agreed to taking these changes:

Recommended Actions for Repository Maintainers

  1. Update requirements.txt with specific package versions to prevent dependency conflicts as some versions of packages are incompatible with newer versions of others.
  2. Add explicit documentation about system prerequisites (Visual C++ Build Tools, Rust)
  3. Consider adding a setup script that checks for required system dependencies before installation
  4. Include troubleshooting steps for common errors in the README
<!-- gh-comment-id:2696608045 --> @AJaySi commented on GitHub (Mar 4, 2025): Thank you. @uniqueumesh agreed to taking these changes: **Recommended Actions for Repository Maintainers** 1. Update requirements.txt with specific package versions to prevent dependency conflicts as some versions of packages are incompatible with newer versions of others. 2. Add explicit documentation about system prerequisites (Visual C++ Build Tools, Rust) 3. Consider adding a setup script that checks for required system dependencies before installation 4. Include troubleshooting steps for common errors in the README
Author
Owner

@AJaySi commented on GitHub (Mar 10, 2025):

@cypheroxide has done a great job on this. Closing it with respect to this work done above.

<!-- gh-comment-id:2709699170 --> @AJaySi commented on GitHub (Mar 10, 2025): @cypheroxide has done a great job on this. Closing it with respect to this work done above.
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#448
No description provided.