Windows安装Django模块:

  由于本人安装的Python版本是Python3.7,所以安装命令为:pip3 install django /pip3 install django安装过程中出现一下错误。

C:\>pip3.7 install django
Collecting django
Downloading https://files.pythonhosted.org/packages/ab/15/cfde97943f0db45e4f999c60b696fbb4df59e82bbccc686770f4e44c9094/Django-2.0.7-py3-none-any.whl (7.1MB)
10% |███▍ | 757kB 8.1kB/s eta 0:13:02Exception:
Traceback (most recent call last):
File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 302, in _error_catcher
yield
File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 384, in read
data = self._fp.read(amt)
File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 60, in read
data = self.__fp.read(amt)
File "c:\users\administrator\appdata\local\programs\python\python37\lib\http\client.py", line 447, in read
n = self.readinto(b)
File "c:\users\administrator\appdata\local\programs\python\python37\lib\http\client.py", line 491, in readinto
n = self.fp.readinto(b)
File "c:\users\administrator\appdata\local\programs\python\python37\lib\socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "c:\users\administrator\appdata\local\programs\python\python37\lib\ssl.py", line 1049, in recv_into
return self.read(nbytes, buffer)
File "c:\users\administrator\appdata\local\programs\python\python37\lib\ssl.py", line 908, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\basecommand.py", line 228, in main
status = self.run(options, args)
File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\commands\install.py", line 291, in run
resolver.resolve(requirement_set)
File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\resolve.py", line 103, in resolve
self._resolve_one(requirement_set, req)
File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\resolve.py", line 257, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\resolve.py", line 210, in _get_abstract_dist_for
self.require_hashes
File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\prepare.py", line 310, in prepare_linked_requirement
progress_bar=self.progress_bar
File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\download.py", line 837, in unpack_url
progress_bar=progress_bar
File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\download.py", line 674, in unpack_http_url
progress_bar)
File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\download.py", line 898, in _download_http_url
_download_url(resp, link, content_file, hashes, progress_bar)
File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\download.py", line 618, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\utils\hashes.py", line 48, in check_against_chunks
for chunk in chunks:
File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\download.py", line 586, in written_chunks
for chunk in chunks:
File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\utils\ui.py", line 159, in iter
for x in it:
File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\download.py", line 575, in resp_read
decode_content=False):
File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 436, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 401, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "c:\users\administrator\appdata\local\programs\python\python37\lib\contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 307, 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.

其实这个错误主要是因为电脑网速太慢导致的,所以只需要重新输入上面的命令,重新安装即可。直到出现下面的提示说明Django外部模块安装成功

Collecting django
Using cached https://files.pythonhosted.org/packages/ab/15/cfde97943f0db45e4f999c60b696fbb4df59e82bbccc686770f4e44c9094/Django-2.0.7-py3-none-any.whl
Collecting pytz (from django)
Downloading https://files.pythonhosted.org/packages/30/4e/27c34b62430286c6d59177a0842ed90dc789ce5d1ed740887653b898779a/pytz-2018.5-py2.py3-none-any.whl (510kB)
100% |████████████████████████████████| 512kB 550kB/s
Installing collected packages: pytz, django
The script django-admin.exe is installed in 'c:\users\administrator\appdata\local\programs\python\python37\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed django-2.0.7 pytz-2018.5

到此该模块安装成功,希望可以帮助到路过的小伙伴。。。。。。。

python安装外部模块Django的更多相关文章

  1. sae python安装第三方模块

    sae python安装第三方模块 经过这一个星期的折腾,发现编程真心不是看出来的,真心是跟着书上的代码敲出来的.sae的服务做得很好,不过有时候会崩就是了.当sae上没有自己所需要的第三方模块时,可 ...

  2. windows(32位 64位)下python安装mysqldb模块

    windows(32位 64位)下python安装mysqldb模块 www.111cn.net 编辑:mengchu9 来源:转载 本文章来给各位使用在此windows系统中的python来安装一个 ...

  3. Python 安装cx_Oracle模块

    1.Python安装cx_Oracle模块需要安装Oracle,并在环境变量中添加Oracle的路径. 2.没有安装Oracle的需要下载一个oci.dll的文件,并把文件的路径添加到path中. 如 ...

  4. python安装、模块安装

    python安装 windows 下载安装包 https://www.python.org/downloads 改环境变量 [右键计算机]-->[属性]-->[高级系统设置]-->[ ...

  5. Python:安装mssql模块功能,并实现与sqlserver连接、查询

    由于我系统是x64系统,所以下载python2.7 x64.下载地址:https://www.python.org/downloads/release/python-2712/, 经过测试发现这个版本 ...

  6. python 安装第三方模块

    在Python中,安装第三方模块,是通过setuptools这个工具完成的. 如果你正在使用Mac或Linux,安装setuptools本身这个步骤就可以跳过了. 如果你正在使用Windows,请首先 ...

  7. import pandas as pd Python安装pandas模块

    在学习python过程中需要用到一个叫pandas的模块,在pycharm中安装时总是出错. 千般百度折腾还是无果,后来发现它需要安装很多依赖包.就问你气不气~ 需要手动安装啊,千万记住,这里有个py ...

  8. python安装mysqlclient模块报fatal error: Python.h:解决方法

    在搭建Flask框架安装mysqlclient模块时候老是报fatal error: Python.h:错误,折腾老半天,百度了老半天看了不少大神帖子,就是没解决, 后来发现这不是个BUG,都是自己的 ...

  9. 为python安装matplotlib模块

    matplotlib是python中强大的画图模块. 首先确保已经安装python,然后用pip来安装matplotlib模块. 进入到cmd窗口下,执行python -m pip install - ...

随机推荐

  1. 服务器端将复合json对象传回前端

    前端接收后端传过来的JSON对象,对前端来说,传过来的确实就是JSON对象:但后端,类型则灵活得多,可以是IList<>等类型,当然也可以是newtonsoft的JObject类型.反正在 ...

  2. 2016/1/1 运算符 笔记整理 接2015/12/30 Java 语法

    ④运算符 1,赋值运算符:实现从右向左的赋值,符号= 2,算术运算符:符号 + - * / %(求余或求模),结果自动转成最大的                      类型,自动升级. 3, 比较 ...

  3. 【bzoj4538】[Hnoi2016]网络

    我们考虑树剖,线段树上维护一个堆,保存不经过该段区间的路径的权值. 对于一条路径我们将对于线段树中的区间提取出来,在对于线段树中进行修改.也就是在堆中插入或删除. 对于一次询问,只要找到包含该点的线段 ...

  4. 网关 192.168.2.1 114.114.114.114 dns查询

    在浏览器输入域名 分析抓包数据 分析 ip 192.168.3.123 网关192.168.2.1

  5. H264编码技术[3]

    H.264的目标应用涵盖了目前大部分的视频服务,如有线电视远程监控.交互媒体.数字电视.视频会议.视频点播.流媒体服务等.H.264为解决不同应用中的网络传输的差异.定义了两层:视频编码层(VCL:V ...

  6. bzoj1854 [Scoi2010]游戏——匈牙利算法

    题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1854 这题...据说可以用并查集做,但没有去看... 用二分图匹配的话,就把装备和它的两个属 ...

  7. 杂项-DB:Druid

    ylbtech-杂项-DB:Druid Apache Druid (incubating) is a high performance analytics data store for event-d ...

  8. 卸载CentOS7-x64自带的OpenJDK的方法

    第一步:查看并卸载CentOS自带的OpenJDK 安装好的CentOS会自带OpenJdk,用命令 java -version ,会有下面的信息: java version "1.6.0& ...

  9. 策略设计测试用例实践(2)--Pairwise(转)

    一.关于”好的“测试用例 在设计测试用例的时候有多种设计方法和策略可以使用,使得测试用例设计得更丰富,尽可能覆盖到更多的程序路径和功能场景.常见的测试用例设计方法被提到最多的就是等价类划分.边界值分析 ...

  10. bzoj 1914: [Usaco2010 OPen]Triangle Counting 数三角形【叉积+极角排序+瞎搞】

    参考:https://blog.csdn.net/u012288458/article/details/50830498 有点神啊 正难则反,考虑计算不符合要求的三角形.具体方法是枚举每个点,把这个点 ...