[GH-ISSUE #9] ModuleNotFoundError: No module named 'flask' #4

Closed
opened 2026-10-15 18:03:18 +00:00 by bsakaguchi · 4 comments
Owner

Originally created by @trihardseven on GitHub (Apr 12, 2023).
Original GitHub issue: https://github.com/SillyTavern/SillyTavern-Extras/issues/9

Getting this error when trying to install the extra modules:

$ python server.py --enable-modules=caption
Traceback (most recent call last):
File "N:\AI\Text\TavernAI-extras\server.py", line 2, in
from flask import Flask, jsonify, request, render_template_string, abort
ModuleNotFoundError: No module named 'flask'

Originally created by @trihardseven on GitHub (Apr 12, 2023). Original GitHub issue: https://github.com/SillyTavern/SillyTavern-Extras/issues/9 Getting this error when trying to install the extra modules: $ python server.py --enable-modules=caption Traceback (most recent call last): File "N:\AI\Text\TavernAI-extras\server.py", line 2, in <module> from flask import Flask, jsonify, request, render_template_string, abort ModuleNotFoundError: No module named 'flask'
Author
Owner

@Cohee1207 commented on GitHub (Apr 12, 2023):

Did you run pip install -r requirements.txt first?

<!-- gh-comment-id:1506109910 --> @Cohee1207 commented on GitHub (Apr 12, 2023): Did you run `pip install -r requirements.txt` first?
Author
Owner

@trihardseven commented on GitHub (Apr 12, 2023):

Yes. I just checked and I'm getting an error when running that.

Successfully built transformers
Installing collected packages: networkx, MarkupSafe, markdown, itsdangerous, idna, filelock, colorama, charset-normalizer, certifi, Werkzeug, tqdm, requests, jinja2, click, webuiapi, torch, huggingface-hub, flask, transformers, flask-cors, flask-cloudflared
ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\Python311\share'
Consider using the --user option or check the permissions.

<!-- gh-comment-id:1506111184 --> @trihardseven commented on GitHub (Apr 12, 2023): Yes. I just checked and I'm getting an error when running that. Successfully built transformers Installing collected packages: networkx, MarkupSafe, markdown, itsdangerous, idna, filelock, colorama, charset-normalizer, certifi, Werkzeug, tqdm, requests, jinja2, click, webuiapi, torch, huggingface-hub, flask, transformers, flask-cors, flask-cloudflared ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\\Python311\\share' Consider using the `--user` option or check the permissions.
Author
Owner

@trihardseven commented on GitHub (Apr 13, 2023):

ran with --user like the console suggested and it worked

<!-- gh-comment-id:1506128712 --> @trihardseven commented on GitHub (Apr 13, 2023): ran with --user like the console suggested and it worked
Author
Owner

@hboxgames commented on GitHub (Sep 15, 2023):

Hi, What do you mean running with --user could you specify the solution for others... please thanks

<!-- gh-comment-id:1720831217 --> @hboxgames commented on GitHub (Sep 15, 2023): Hi, What do you mean running with --user could you specify the solution for others... please thanks
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
SillyTavern/SillyTavern-Extras#4
No description provided.