Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'requests'#Ubuntu #33

Open
limumua opened this issue Jun 25, 2023 · 6 comments
Open

ModuleNotFoundError: No module named 'requests'#Ubuntu #33

limumua opened this issue Jun 25, 2023 · 6 comments

Comments

@limumua
Copy link

limumua commented Jun 25, 2023

I have installed requests, but it still doesn't work,help,pl。
image

@limumua limumua changed the title ModuleNotFoundError: No module named 'requests' ModuleNotFoundError: No module named 'requests'#Ubuntu Jun 25, 2023
@dillfrescott
Copy link

Same error on Win 11

@ParisNeo
Copy link
Owner

ParisNeo commented Jul 3, 2023

requests is installable in requirements.txt
I don't understand why it is not working on your PC. In the docker I do install requirements.txt and I can see it exists in requests!
In the docker file there is this:

RUN python3 -m venv venv && . venv/bin/activate
RUN python3 -m pip install --no-cache-dir -r requirements.txt --upgrade pip

which should install it. Verify that you have the latest requirements.txt

@airdogvan
Copy link

at the time of writing requests in NOT in requirements.txt.
I tried by adding it to requirements.txt and the result: (sorry for the long log)

docker compose -f docker-compose.yml up
[+] Running 2/2
⠿ Network gpt4all-webui_default Created 0.1s
⠿ Container gpt4all-webui-webui-1 Created 0.1s
Attaching to gpt4all-webui-webui-1
gpt4all-webui-webui-1 | Looking in indexes: https://download.pytorch.org/whl/cu117
gpt4all-webui-webui-1 | Collecting torch
gpt4all-webui-webui-1 | Downloading https://download.pytorch.org/whl/cu117/torch-2.0.1%2Bcu117-cp310-cp310-linux_x86_64.whl (1843.9 MB)
gpt4all-webui-webui-1 | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 GB 20.9 MB/s eta 0:00:00
gpt4all-webui-webui-1 | Collecting torchvision
gpt4all-webui-webui-1 | Downloading https://download.pytorch.org/whl/cu117/torchvision-0.15.2%2Bcu117-cp310-cp310-linux_x86_64.whl (6.1 MB)
gpt4all-webui-webui-1 | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.1/6.1 MB 27.2 MB/s eta 0:00:00
gpt4all-webui-webui-1 | Collecting torchaudio
gpt4all-webui-webui-1 | Downloading https://download.pytorch.org/whl/cu117/torchaudio-2.0.2%2Bcu117-cp310-cp310-linux_x86_64.whl (4.4 MB)
gpt4all-webui-webui-1 | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.4/4.4 MB 36.5 MB/s eta 0:00:00
gpt4all-webui-webui-1 | Collecting filelock (from torch)
gpt4all-webui-webui-1 | Downloading https://download.pytorch.org/whl/filelock-3.9.0-py3-none-any.whl (9.7 kB)
gpt4all-webui-webui-1 | Collecting typing-extensions (from torch)
gpt4all-webui-webui-1 | Downloading https://download.pytorch.org/whl/typing_extensions-4.4.0-py3-none-any.whl (26 kB)
gpt4all-webui-webui-1 | Collecting sympy (from torch)
gpt4all-webui-webui-1 | Downloading https://download.pytorch.org/whl/sympy-1.11.1-py3-none-any.whl (6.5 MB)
gpt4all-webui-webui-1 | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.5/6.5 MB 41.7 MB/s eta 0:00:00
gpt4all-webui-webui-1 | Collecting networkx (from torch)
gpt4all-webui-webui-1 | Downloading https://download.pytorch.org/whl/networkx-3.0-py3-none-any.whl (2.0 MB)
gpt4all-webui-webui-1 | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 35.1 MB/s eta 0:00:00
gpt4all-webui-webui-1 | Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/site-packages (from torch) (3.1.2)
gpt4all-webui-webui-1 | Collecting triton==2.0.0 (from torch)
gpt4all-webui-webui-1 | Downloading https://download.pytorch.org/whl/triton-2.0.0-1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (63.3 MB)
gpt4all-webui-webui-1 | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.3/63.3 MB 20.9 MB/s eta 0:00:00
gpt4all-webui-webui-1 | Collecting cmake (from triton==2.0.0->torch)
gpt4all-webui-webui-1 | Downloading https://download.pytorch.org/whl/cmake-3.25.0-py2.py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.7 MB)
gpt4all-webui-webui-1 | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 23.7/23.7 MB 24.0 MB/s eta 0:00:00
gpt4all-webui-webui-1 | Collecting lit (from triton==2.0.0->torch)
gpt4all-webui-webui-1 | Downloading https://download.pytorch.org/whl/lit-15.0.7.tar.gz (132 kB)
gpt4all-webui-webui-1 | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 132.3/132.3 kB 40.8 MB/s eta 0:00:00
gpt4all-webui-webui-1 | Preparing metadata (setup.py): started
gpt4all-webui-webui-1 | Preparing metadata (setup.py): finished with status 'done'
gpt4all-webui-webui-1 | Collecting numpy (from torchvision)
gpt4all-webui-webui-1 | Downloading https://download.pytorch.org/whl/numpy-1.24.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
gpt4all-webui-webui-1 | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.3/17.3 MB 23.0 MB/s eta 0:00:00
gpt4all-webui-webui-1 | Requirement already satisfied: requests in /usr/local/lib/python3.10/site-packages (from torchvision) (2.31.0)
gpt4all-webui-webui-1 | Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in /usr/local/lib/python3.10/site-packages (from torchvision) (10.0.0)
gpt4all-webui-webui-1 | Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/site-packages (from jinja2->torch) (2.1.3)
gpt4all-webui-webui-1 | Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/site-packages (from requests->torchvision) (3.1.0)
gpt4all-webui-webui-1 | Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/site-packages (from requests->torchvision) (3.4)
gpt4all-webui-webui-1 | Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/site-packages (from requests->torchvision) (2.0.3)
gpt4all-webui-webui-1 | Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/site-packages (from requests->torchvision) (2023.5.7)
gpt4all-webui-webui-1 | Collecting mpmath>=0.19 (from sympy->torch)
gpt4all-webui-webui-1 | Downloading https://download.pytorch.org/whl/mpmath-1.2.1-py3-none-any.whl (532 kB)
gpt4all-webui-webui-1 | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 532.6/532.6 kB 40.4 MB/s eta 0:00:00
gpt4all-webui-webui-1 | Building wheels for collected packages: lit
gpt4all-webui-webui-1 | Building wheel for lit (setup.py): started
gpt4all-webui-webui-1 | Building wheel for lit (setup.py): finished with status 'done'
gpt4all-webui-webui-1 | Created wheel for lit: filename=lit-15.0.7-py3-none-any.whl size=89988 sha256=17dd3556cea5778ebc82945d6a7cd25b0aa99a85f80b6c641897c21166e3d1d7
gpt4all-webui-webui-1 | Stored in directory: /tmp/pip-ephem-wheel-cache-o_ivwynk/wheels/bf/62/0d/01218f13f6a8051e982a7ce31d12b7bfd725dc69bd227ae104
gpt4all-webui-webui-1 | Successfully built lit
gpt4all-webui-webui-1 | Installing collected packages: mpmath, lit, cmake, typing-extensions, sympy, numpy, networkx, filelock, triton, torch, torchvision, torchaudio
gpt4all-webui-webui-1 | Successfully installed cmake-3.25.0 filelock-3.9.0 lit-15.0.7 mpmath-1.2.1 networkx-3.0 numpy-1.24.1 sympy-1.11.1 torch-2.0.1+cu117 torchaudio-2.0.2+cu117 torchvision-0.15.2+cu117 triton-2.0.0 typing-extensions-4.4.0
gpt4all-webui-webui-1 | WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
gpt4all-webui-webui-1 | Collecting gpt4all (from -r /srv/backends/gpt_4all/requirements.txt (line 1))
gpt4all-webui-webui-1 | Downloading gpt4all-1.0.3-py3-none-manylinux1_x86_64.whl (3.1 MB)
gpt4all-webui-webui-1 | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.1/3.1 MB 11.7 MB/s eta 0:00:00
gpt4all-webui-webui-1 | Requirement already satisfied: requests in /usr/local/lib/python3.10/site-packages (from gpt4all->-r /srv/backends/gpt_4all/requirements.txt (line 1)) (2.31.0)
gpt4all-webui-webui-1 | Requirement already satisfied: tqdm in /usr/local/lib/python3.10/site-packages (from gpt4all->-r /srv/backends/gpt_4all/requirements.txt (line 1)) (4.65.0)
gpt4all-webui-webui-1 | Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/site-packages (from requests->gpt4all->-r /srv/backends/gpt_4all/requirements.txt (line 1)) (3.1.0)
gpt4all-webui-webui-1 | Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/site-packages (from requests->gpt4all->-r /srv/backends/gpt_4all/requirements.txt (line 1)) (3.4)
gpt4all-webui-webui-1 | Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/site-packages (from requests->gpt4all->-r /srv/backends/gpt_4all/requirements.txt (line 1)) (2.0.3)
gpt4all-webui-webui-1 | Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/site-packages (from requests->gpt4all->-r /srv/backends/gpt_4all/requirements.txt (line 1)) (2023.5.7)
gpt4all-webui-webui-1 | Installing collected packages: gpt4all
gpt4all-webui-webui-1 | Successfully installed gpt4all-1.0.3
gpt4all-webui-webui-1 | WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
gpt4all-webui-webui-1 | No local configuration file found. Building from scratch
gpt4all-webui-webui-1 | ******************* Building Backend from main Process *************************
gpt4all-webui-webui-1 | -------------- GPT4All backend by nomic-ai -------------------------------
gpt4all-webui-webui-1 | This is the first time you are using this backend.
gpt4all-webui-webui-1 | Installing ...
gpt4all-webui-webui-1 | Checking pytorch
gpt4all-webui-webui-1 | Installed successfully
gpt4all-webui-webui-1 | Backend loaded successfully
gpt4all-webui-webui-1 | ******************* Building Personality from main Process *************************
gpt4all-webui-webui-1 | Personality file not found or is corrupted (personalities/english/default/gpt4all).
gpt4all-webui-webui-1 | Please verify that the personality you have selected exists or select another personality. Some updates may lead to change in personality name or category, so check the personality selection in settings to be sure.
gpt4all-webui-webui-1 | Checking discussions database...
gpt4all-webui-webui-1 | Upgrading schema to version 3...
gpt4all-webui-webui-1 | Traceback (most recent call last):
gpt4all-webui-webui-1 | File "/srv/gpt4all_api/api.py", line 188, in _rebuild_model
gpt4all-webui-webui-1 | model_file = Path("models")/self.config["backend"]/self.config["model"]
gpt4all-webui-webui-1 | TypeError: unsupported operand type(s) for /: 'PosixPath' and 'NoneType'
gpt4all-webui-webui-1 | ERROR:GPT4All-WebUI:Exception on / [GET]
gpt4all-webui-webui-1 | Traceback (most recent call last):
gpt4all-webui-webui-1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2190, in wsgi_app
gpt4all-webui-webui-1 | response = self.full_dispatch_request()
gpt4all-webui-webui-1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1486, in full_dispatch_request
gpt4all-webui-webui-1 | rv = self.handle_user_exception(e)
gpt4all-webui-webui-1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request
gpt4all-webui-webui-1 | rv = self.dispatch_request()
gpt4all-webui-webui-1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request
gpt4all-webui-webui-1 | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
gpt4all-webui-webui-1 | File "/srv/app.py", line 454, in index
gpt4all-webui-webui-1 | return render_template("index.html")
gpt4all-webui-webui-1 | File "/usr/local/lib/python3.10/site-packages/flask/templating.py", line 150, in render_template
gpt4all-webui-webui-1 | template = app.jinja_env.get_or_select_template(template_name_or_list)
gpt4all-webui-webui-1 | File "/usr/local/lib/python3.10/site-packages/jinja2/environment.py", line 1081, in get_or_select_template
gpt4all-webui-webui-1 | return self.get_template(template_name_or_list, parent, globals)
gpt4all-webui-webui-1 | File "/usr/local/lib/python3.10/site-packages/jinja2/environment.py", line 1010, in get_template
gpt4all-webui-webui-1 | return self._load_template(name, globals)
gpt4all-webui-webui-1 | File "/usr/local/lib/python3.10/site-packages/jinja2/environment.py", line 969, in _load_template
gpt4all-webui-webui-1 | template = self.loader.load(self, name, self.make_globals(globals))
gpt4all-webui-webui-1 | File "/usr/local/lib/python3.10/site-packages/jinja2/loaders.py", line 126, in load
gpt4all-webui-webui-1 | source, filename, uptodate = self.get_source(environment, name)
gpt4all-webui-webui-1 | File "/usr/local/lib/python3.10/site-packages/flask/templating.py", line 64, in get_source
gpt4all-webui-webui-1 | return self._get_source_fast(environment, template)
gpt4all-webui-webui-1 | File "/usr/local/lib/python3.10/site-packages/flask/templating.py", line 98, in _get_source_fast
gpt4all-webui-webui-1 | raise TemplateNotFound(template)
gpt4all-webui-webui-1 | jinja2.exceptions.TemplateNotFound: index.html
gpt4all-webui-webui-1 | ERROR:GPT4All-WebUI:Exception on / [GET]
gpt4all-webui-webui-1 | Traceback (most recent call last):
gpt4all-webui-webui-1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2190, in wsgi_app
gpt4all-webui-webui-1 | response = self.full_dispatch_request()
gpt4all-webui-webui-1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1486, in full_dispatch_request
gpt4all-webui-webui-1 | rv = self.handle_user_exception(e)
gpt4all-webui-webui-1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request
gpt4all-webui-webui-1 | rv = self.dispatch_request()
gpt4all-webui-webui-1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request
gpt4all-webui-webui-1 | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
gpt4all-webui-webui-1 | File "/srv/app.py", line 454, in index
gpt4all-webui-webui-1 | return render_template("index.html")
gpt4all-webui-webui-1 | File "/usr/local/lib/python3.10/site-packages/flask/templating.py", line 150, in render_template
gpt4all-webui-webui-1 | template = app.jinja_env.get_or_select_template(template_name_or_list)
gpt4all-webui-webui-1 | File "/usr/local/lib/python3.10/site-packages/jinja2/environment.py", line 1081, in get_or_select_template
gpt4all-webui-webui-1 | return self.get_template(template_name_or_list, parent, globals)
gpt4all-webui-webui-1 | File "/usr/local/lib/python3.10/site-packages/jinja2/environment.py", line 1010, in get_template
gpt4all-webui-webui-1 | return self._load_template(name, globals)
gpt4all-webui-webui-1 | File "/usr/local/lib/python3.10/site-packages/jinja2/environment.py", line 969, in _load_template
gpt4all-webui-webui-1 | template = self.loader.load(self, name, self.make_globals(globals))
gpt4all-webui-webui-1 | File "/usr/local/lib/python3.10/site-packages/jinja2/loaders.py", line 126, in load
gpt4all-webui-webui-1 | source, filename, uptodate = self.get_source(environment, name)
gpt4all-webui-webui-1 | File "/usr/local/lib/python3.10/site-packages/flask/templating.py", line 64, in get_source
gpt4all-webui-webui-1 | return self._get_source_fast(environment, template)
gpt4all-webui-webui-1 | File "/usr/local/lib/python3.10/site-packages/flask/templating.py", line 98, in _get_source_fast
gpt4all-webui-webui-1 | raise TemplateNotFound(template)
gpt4all-webui-webui-1 | jinja2.exceptions.TemplateNotFound: index.html

And it just stays there...

@ParisNeo
Copy link
Owner

ParisNeo commented Jul 7, 2023

Wait! There is something really odd here return render_template("index.html") is not supposed to be called. It has been removed since we moved to V2.
Are you sure your code is uptodate?

@ParisNeo
Copy link
Owner

ParisNeo commented Jul 7, 2023

Loooool. I now understand the problem.
You are still using GPT4all-webui.
I should put deprecated on this project. I just keep it for history.
Now the main project is lollms-webui:
https://github.com/ParisNeo/lollms-webui
Here is a video on how it works:
https://www.youtube.com/watch?v=MxXNGv1zJ1A&ab_channel=ParisNeo

@airdogvan
Copy link

thank you. Maybe put a link on the old site so that people know. When I googled gpt4all webui this is the site I ended on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants