"pip install requirements.txt" command returns many errors, including 404 not found
(myenv1) root@p-VirtualBox:~/online-exam/onlineexam# pip install requirements.txt
Collecting requirements.txt
Exception:
Traceback (most recent call last): File "/root/online-exam/myenv1/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/root/online-exam/myenv1/lib/python3.6/site-packages/pip/commands/install.py", line 353, in run wb.build(autobuilding=True) File "/root/online-exam/myenv1/lib/python3.6/site-packages/pip/wheel.py", line 749, in build self.requirement_set.prepare_files(self.finder) File "/root/online-exam/myenv1/lib/python3.6/site-packages/pip/req/req_set.py", line 380, in prepare_files ignore_dependencies=self.ignore_dependencies)) File "/root/online-exam/myenv1/lib/python3.6/site-packages/pip/req/req_set.py", line 554, in _prepare_file require_hashes File "/root/online-exam/myenv1/lib/python3.6/site-packages/pip/req/req_install.py", line 278, in populate_link self.link = finder.find_requirement(self, upgrade) File "/root/online-exam/myenv1/lib/python3.6/site-packages/pip/index.py", line 465, in find_requirement all_candidates = self.find_all_candidates(req.name) File "/root/online-exam/myenv1/lib/python3.6/site-packages/pip/index.py", line 423, in find_all_candidates for page in self._get_pages(url_locations, project_name): File "/root/online-exam/myenv1/lib/python3.6/site-packages/pip/index.py", line 568, in _get_pages page = self._get_page(location) File "/root/online-exam/myenv1/lib/python3.6/site-packages/pip/index.py", line 683, in _get_page return HTMLPage.get_page(link, session=self.session) File "/root/online-exam/myenv1/lib/python3.6/site-packages/pip/index.py", line 795, in get_page resp.raise_for_status() File "/root/online-exam/myenv1/share/python-wheels/", line 935, in raise_for_status raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: 4 2 Answers
You are missing -r command flag, so go again with:
pip install -r requirements.txtAs it was before, pip just try to get requirements-txt from remote store expecting it to be a package name.
See pip help install
Usage:
pip install [options] <requirement specifier> [package-index-options] ... pip install [options] -r <requirements file> [package-index-options] ... ... pip also supports installing from "requirements files", which provide an easy way to specify a whole environment to be installed.Install Options:
-r, --requirement <file> Install from the given requirements file. This option can be used multiple times.
pip3 install -r requirements.txtor
pip install -r requirements.txt would help