mirror of
https://github.com/AJaySi/ALwrity.git
synced 2026-04-25 08:55:58 +03:00
[GH-ISSUE #142] After following the beginners installation script I got errors #448
Labels
No labels
AI Content Agents
AI Content Strategy
AI Content planning
AI Marketing Tools
AI SEO
AI personalization
AI writer
ALwrity Copi-lot
Alwrity web search
Anthropic
DeepSeek
Gemini AI
Integration
LLM
OnBoarding
OnBoarding
RAG knowledgebase Memory
bug
documentation
enhancement
good first issue
help wanted
invalid
openai
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ALwrity#448
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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)
@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.pynotpython alwrity.pyWe apologize for not updating our steps guide.
Please check and let us know. Thank you
@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:
@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.
@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:
@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
.gitignorein the project, so the git history would be filled with the files under.venvif using virtual environment, same as__pycache__@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
@uniqueumesh commented on GitHub (Jan 2, 2025):
Hi, @xiaoyan13
The error indicates that the Python module
pytubefixis not installed or is not accessible in your current environment. Here's how you can resolve the issue:pip show pytubefixpip install pytubefixAfter making these changes, re-run your script:
streamlit run alwrity.pyPlease check the following steps and let us know if it works. Thank you.
@AJaySi commented on GitHub (Jan 9, 2025):
@uniqueumesh
please close this issue, if not required anymore. Thanks.
@uniqueumesh commented on GitHub (Jan 9, 2025):
I am closing this issue. Thank you
@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
git clone https://github.com/AJaySi/AI-Writer.gitpython -m venv venvand activate itpip install -r requirements.txtActual Behavior
The installation fails with dependency errors. When attempting to resolve one dependency issue, new errors appear. The specific errors include:
The issue persists despite:
Expected Behavior
The installation process should complete without errors, and the application should run successfully as described in the documentation.
Proposed Solution
I'm happy to provide more detailed error logs if needed or assist with testing potential fixes.
@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:
Visual Studio Build Tools - Required to build some dependencies from source:
Rust Compiler - Required for tiktoken and possibly other packages:
I'm still working through the installation process and will update with final results or any additional dependencies and steps, as necessary.
@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.
@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 withrust-upon the Linux systems andRustlang.Rust.MSVCon 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, thechroma-hnswlibpackage 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:
This occurred while building the wheel for
chroma-hnswlib, which is a dependency ofchromadbused by various AI/ML packages in our requirements.Environment Details
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)
Download the Visual Studio Build Tools installer from the official Microsoft website:
Visual Studio Build Tools
Run the downloaded installer.
In the Visual Studio Installer, select the "Desktop development with C++" workload.
Click "Install" to begin the installation process.
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:
Download Visual Studio Community from:
Visual Studio Community
During installation, make sure to select the "Desktop development with C++" workload.
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:
This should allow the proper compilation of packages that require C++ extensions.
Additional Notes
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.
@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 ?
@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:
Complete Installation Steps
For anyone still experiencing dependency installation issues, follow these steps:
Step 1: Install System Dependencies
Windows:
Linux:
Step 2: Create and Activate Virtual Environment
Step 3: Update Pip and Install Dependencies
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
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.
@AJaySi commented on GitHub (Mar 4, 2025):
Thank you.
@uniqueumesh agreed to taking these changes:
Recommended Actions for Repository Maintainers
@AJaySi commented on GitHub (Mar 10, 2025):
@cypheroxide has done a great job on this. Closing it with respect to this work done above.