简体   繁体   English

我在尝试安装 django 时收到错误代码

[英]I got the error code trying to install django

Traceback (most recent call last): File "C:\Users\HP\myproject\lib\site-packages\pip_vendor\urllib3\response.py", line 438, in _error_catcher yield File "C:\Users\HP\myproject\lib\site-packages\pip_vendor\urllib3\response.py", line 519, in read data = self._fp.read(amt) if not fp_closed else b"" File "C:\Users\HP\myproject\lib\site-packages\pip_vendor\cachecontrol\filewrapper.py", line 62, in read data = self.__fp.read(amt) File "C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 465, in read s = self.fp.read(amt) File "C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\socket.py", line 705, in readinto return self._sock.recv_into(b) File "C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\ssl.py", line 1273, in recv_into return self.read(nbytes, buffer) File "C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\ssl.py", line 1129, in read return self._sslobj.read(len, buffer) TimeoutError: The read operation timed out Traceback(最近一次调用最后一次):文件“C:\Users\HP\myproject\lib\site-packages\pip_vendor\urllib3\response.py”,第 438 行,在 _error_catcher 产生文件“C:\Users\HP\myproject \lib\site-packages\pip_vendor\urllib3\response.py",第 519 行,在读取数据中 = self._fp.read(amt) if not fp_closed else b"" File "C:\Users\HP\myproject\lib \site-packages\pip_vendor\cachecontrol\filewrapper.py”,第 62 行,在读取数据 = self.__fp.read(amt) 文件“C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\ http\client.py”,第 465 行,读取 s = self.fp.read(amt) 文件“C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\socket.py”,第 705 行,在 readinto 中返回 self._sock.recv_into(b) 文件“C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\ssl.py”,第 1273 行,在 recv_into 中返回 self.read(nbytes,缓冲区)文件“C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\ssl.py”,第 1129 行,在读取中返回 self._sslobj.read(len, buffer) TimeoutError:读取操作计时出去

During handling of the above exception, another exception occurred:在处理上述异常的过程中,又出现了一个异常:

Traceback (most recent call last): File "C:\Users\HP\myproject\lib\site-packages\pip_internal\cli\base_command.py", line 173, in _main status = self.run(options, args) File "C:\Users\HP\myproject\lib\site-packages\pip_internal\cli\req_command.py", line 203, in wrapper return func(self, options, args) File "C:\Users\HP\myproject\lib\site-packages\pip_internal\commands\install.py", line 315, in run requirement_set = resolver.resolve( File "C:\Users\HP\myproject\lib\site-packages\pip_internal\resolution\resolvelib\resolver.py", line 94, in resolve result = self._result = resolver.resolve( File "C:\Users\HP\myproject\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 472, in resolve state = resolution.resolve(requirements, max_rounds=max_rounds) File "C:\Users\HP\myproject\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 341, in resolve self._add_to_criteria(self.state.criteria, r Traceback(最近一次调用最后一次):文件“C:\Users\HP\myproject\lib\site-packages\pip_internal\cli\base_command.py”,第 173 行,在 _main status = self.run(options, args) 文件中“C:\Users\HP\myproject\lib\site-packages\pip_internal\cli\req_command.py”,第 203 行,在包装返回 func(self, options, args) 文件“C:\Users\HP\myproject\ lib\site-packages\pip_internal\commands\install.py",第 315 行,运行中 requirements_set = resolver.resolve( File "C:\Users\HP\myproject\lib\site-packages\pip_internal\resolution\resolvelib\resolver .py",第 94 行,解析结果 = self._result = resolver.resolve( 文件 "C:\Users\HP\myproject\lib\site-packages\pip_vendor\resolvelib\resolvers.py",第 472 行,解析state = resolution.resolve(requirements, max_rounds=max_rounds) 文件“C:\Users\HP\myproject\lib\site-packages\pip_vendor\resolvelib\resolvers.py”,第 341 行,在解析 self._add_to_criteria(self.Z9ED39E2EA93142EF586666 .标准,r , parent=None) File "C:\Users\HP\myproject\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 172, in _add_to_criteria if not criterion.candidates: File "C:\Users\HP\myproject\lib\site-packages\pip_vendor\resolvelib\structs.py", line 151, in bool return bool(self._sequence) File "C:\Users\HP\myproject\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 140, in bool return any(self) File "C:\Users\HP\myproject\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 128, in return (c for c in iterator if id(c) not in self._incompatible_ids) File "C:\Users\HP\myproject\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 32, in _iter_built candidate = func() File "C:\Users\HP\myproject\lib\site-packages\pip_internal\resolution\resolvelib\factory.py", line 204, in _make_candidate_from_link self._link_candidate_cache[link] = LinkCandidate( File "C:\Users\HP\myproject\lib\ , parent=None) 文件“C:\Users\HP\myproject\lib\site-packages\pip_vendor\resolvelib\resolvers.py”,第 172 行,在 _add_to_criteria 中,如果不是criteria.candidates:文件“C:\Users\HP \myproject\lib\site-packages\pip_vendor\resolvelib\structs.py”,第 151 行,在bool return bool(self._sequence) 文件“C:\Users\HP\myproject\lib\site-packages\pip_internal\resolution \resolvelib\found_candidates.py”,第 140 行,在bool中返回任何(自身)文件“C:\Users\HP\myproject\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py”,第 128 行,在return (c for c in iterator if id(c) not in self._incompatible_ids) 文件“C:\Users\HP\myproject\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py”,第 32 行,在_iter_built 候选 = func() 文件“C:\Users\HP\myproject\lib\site-packages\pip_internal\resolution\resolvelib\factory.py”,第 204 行,在 _make_candidate_from_link self._link_candidate_cache[link] = LinkCandidate(File" C:\Users\HP\myproject\lib\ site-packages\pip_internal\resolution\resolvelib\candidates.py", line 295, in init super(). site-packages\pip_internal\resolution\resolvelib\candidates.py",第 295 行,在init super() 中。 init ( File "C:\Users\HP\myproject\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 156, in init self.dist = self._prepare() File "C:\Users\HP\myproject\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 227, in _prepare dist = self._prepare_distribution() File "C:\Users\HP\myproject\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 305, in _prepare_distribution return self._factory.preparer.prepare_linked_requirement( File "C:\Users\HP\myproject\lib\site-packages\pip_internal\operations\prepare.py", line 508, in prepare_linked_requirement return self._prepare_linked_requirement(req, parallel_builds) File "C:\Users\HP\myproject\lib\site-packages\pip_internal\operations\prepare.py", line 550, in _prepare_linked_requirement local_file = unpack_url( File "C:\Users\HP\myproject\lib\site-packages\pip_internal\operations\prepare.py", line 239, in unpack_url file = get_http_url( File "C:\Users\HP\myproject\lib\site-packag init (文件“C:\Users\HP\myproject\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py”,第 156 行,在init self.dist = self._prepare() 文件“C:\Users \HP\myproject\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py”,第 227 行,在 _prepare dist = self._prepare_distribution() 文件“C:\Users\HP\myproject\lib\site-packages \pip_internal\resolution\resolvelib\candidates.py”,第 305 行,在 _prepare_distribution 中返回 self._factory.preparer.prepare_linked_requirement(文件“C:\Users\HP\myproject\lib\site-packages\pip_internal\operations\prepare.py ”,第 508 行,在 prepare_linked_requirement 中返回 self._prepare_linked_requirement(req,parallel_builds) 文件“C:\Users\HP\myproject\lib\site-packages\pip_internal\operations\prepare.py”,第 550 行,在 _prepare_linked_requirement local_file = unpack_url (文件“C:\Users\HP\myproject\lib\site-packages\pip_internal\operations\prepare.py”,第 239 行,在 unpack_url 文件 = get_http_url(文件“C:\Users\HP\myproject\lib\site -包装es\pip_internal\operations\prepare.py", line 102, in get_http_url from_path, content_type = download(link, temp_dir.path) File "C:\Users\HP\myproject\lib\site-packages\pip_internal\network\download.py", line 145, in call for chunk in chunks: File "C:\Users\HP\myproject\lib\site-packages\pip_internal\cli\progress_bars.py", line 144, in iter for x in it: File "C:\Users\HP\myproject\lib\site-packages\pip_internal\network\utils.py", line 63, in response_chunks for chunk in response.raw.stream( File "C:\Users\HP\myproject\lib\site-packages\pip_vendor\urllib3\response.py", line 576, in stream data = self.read(amt=amt, decode_content=decode_content) File "C:\Users\HP\myproject\lib\site-packages\pip_vendor\urllib3\response.py", line 512, in read with self._error_catcher(): File "C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit self.gen.throw(typ, value, traceback) File "C:\Users\HP\myproject\lib\site-packages\pip_vendor\urlli es\pip_internal\operations\prepare.py”,第 102 行,在 get_http_url from_path,content_type = download(link, temp_dir.path) 文件“C:\Users\HP\myproject\lib\site-packages\pip_internal\network\download .py",第 145 行,在块中调用块:文件 "C:\Users\HP\myproject\lib\site-packages\pip_internal\cli\progress_bars.py",第 144 行,在 iter for x 中:文件“C:\Users\HP\myproject\lib\site-packages\pip_internal\network\utils.py”,第 63 行,在 response_chunks 中,用于 response.raw.stream 中的块(文件“C:\Users\HP\myproject \lib\site-packages\pip_vendor\urllib3\response.py",第 576 行,在 stream 中数据 = self.read(amt=amt, decode_content=decode_content) 文件“C:\Users\HP\myproject\lib\site- packages\pip_vendor\urllib3\response.py",第 512 行,使用 self._error_catcher() 读取:文件 "C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\contextlib.py",行153、在退出self.gen.throw(typ, value, traceback) 文件“C:\Users\HP\myproject\lib\site-packages\pip_vendor\urlli b3\response.py", line 443, in _error_catcher raise ReadTimeoutError(self._pool, None, "Read timed out.") pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out. b3\response.py",第 443 行,在 _error_catcher 中引发 ReadTimeoutError(self._pool, None, "Read timed out.") pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): 读取超时。

Test the Django installation in a virtual environment, in cmd:在虚拟环境中测试 Django 安装,在 cmd 中:

> python -m venv env
> cd env/Scripts/activate
> pip install django

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ModuleNotFoundError,我正在尝试安装 pandas 但我遇到了一些错误 - ModuleNotFoundError, i am trying to install pandas but i got some error 我正在尝试编写代码,但出现此错误 - I'm trying to write a code but i got this error 尝试使用pip安装Django时出错 - Error trying to install Django with pip 我尝试在我的 Linux Mint 上安装 pyaudio 时出错 - I got an error while I'm trying to install pyaudio on my Linux Mint 我尝试使用 pip install django 安装 django,后来我升级 pip 时出错,我完成了升级 pip,但仍然出现如下我提到的错误 - I tried to install django using pip install django, later i get error to upgrade pip, i done upgrade pip, but still got error as below i mentioned 我正在尝试在python 3.4中的django中创建一个新项目,并收到以下错误 - i am trying to create a new project in django in python 3.4 and got the error below 尝试将Django应用程序推送到Heroku时出现以下错误:TomlDecodeError(“无效的日期或数字”) - I got the following error while trying to push my Django app to Heroku: TomlDecodeError(“Invalid date or number”) 我正在尝试使用 Django 测试与 Inspection and Defect 的关系,并在 tests.py 中出错 - I am trying to test a relationship with Inspection and Defect using Django and got an error in tests.py 我正在尝试导入这个 simpletransformers 得到了错误 - I am trying to import this simpletransformers got the error 尝试安装Django时出现语法错误 - Syntax error while trying to install Django
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM