python安装外部模块Django
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
到此该模块安装成功,希望可以帮助到路过的小伙伴。。。。。。。
.png)
python安装外部模块Django的更多相关文章
- sae python安装第三方模块
		
sae python安装第三方模块 经过这一个星期的折腾,发现编程真心不是看出来的,真心是跟着书上的代码敲出来的.sae的服务做得很好,不过有时候会崩就是了.当sae上没有自己所需要的第三方模块时,可 ...
 - windows(32位 64位)下python安装mysqldb模块
		
windows(32位 64位)下python安装mysqldb模块 www.111cn.net 编辑:mengchu9 来源:转载 本文章来给各位使用在此windows系统中的python来安装一个 ...
 - Python 安装cx_Oracle模块
		
1.Python安装cx_Oracle模块需要安装Oracle,并在环境变量中添加Oracle的路径. 2.没有安装Oracle的需要下载一个oci.dll的文件,并把文件的路径添加到path中. 如 ...
 - python安装、模块安装
		
python安装 windows 下载安装包 https://www.python.org/downloads 改环境变量 [右键计算机]-->[属性]-->[高级系统设置]-->[ ...
 - Python:安装mssql模块功能,并实现与sqlserver连接、查询
		
由于我系统是x64系统,所以下载python2.7 x64.下载地址:https://www.python.org/downloads/release/python-2712/, 经过测试发现这个版本 ...
 - python 安装第三方模块
		
在Python中,安装第三方模块,是通过setuptools这个工具完成的. 如果你正在使用Mac或Linux,安装setuptools本身这个步骤就可以跳过了. 如果你正在使用Windows,请首先 ...
 - import pandas as pd   Python安装pandas模块
		
在学习python过程中需要用到一个叫pandas的模块,在pycharm中安装时总是出错. 千般百度折腾还是无果,后来发现它需要安装很多依赖包.就问你气不气~ 需要手动安装啊,千万记住,这里有个py ...
 - python安装mysqlclient模块报fatal error: Python.h:解决方法
		
在搭建Flask框架安装mysqlclient模块时候老是报fatal error: Python.h:错误,折腾老半天,百度了老半天看了不少大神帖子,就是没解决, 后来发现这不是个BUG,都是自己的 ...
 - 为python安装matplotlib模块
		
matplotlib是python中强大的画图模块. 首先确保已经安装python,然后用pip来安装matplotlib模块. 进入到cmd窗口下,执行python -m pip install - ...
 
随机推荐
- javascript的Date时差
			
当有日期字符串形如: var dt = "2015-03-16T23:59:59";//注意其中有个T,这是什么表示法?不清楚,可能是GMT标准时 然后转换成日期对象,系统会自动加 ...
 - A Go library implementing an FST (finite state transducer)——mark下
			
https://github.com/couchbaselabs/vellum Building an FST To build an FST, create a new builder using ...
 - js验证手机号,身份证,车牌号验证
			
js验证手机号 <input type="text" class="identificationno"> // 身份证号码为15位或者18位,15 ...
 - luogu3605晋升者计数
			
https://www.zybuluo.com/ysner/note/1282069 题面 给一颗带点权的树,求每个点的子树中比该点权值大的点的个数. \(n\leq10^5\) 解析 首先有个很无脑 ...
 - bzoj2989
			
坐标轴转化+cdq分治 我们发现那个绝对值不太好搞,于是我们把曼哈顿距离转为切比雪夫距离,x'=x-y,y'=x+y,这样两点之间距离就是max(|x1'-x2'|,|y1'-y2'|),这个距离要小 ...
 - query或者JavaScript实现在textarea光标处插入文本
			
1.Jquery函数实现: $(function() { /* 在textarea处插入文本--Start */ (function($) { $.fn.extend({ insertContent ...
 - 【废弃中】【WIP】JavaScript 数组
			
创建: 2018/01/22 更新: 2018/05/20 把此博文加入[javascript]分类, 原来忘记了 废弃: 2019/02/19 重构此篇.原文归入废弃 增加[废弃中]标签与总体任务 ...
 - bzoj 2199: [Usaco2011 Jan]奶牛议会【2-SAT】
			
好久没写2-SAT了啊,还以为是网络流 设点x为选,x'为不选,因为一头牛至少要满足一个条件,所以对于牛条件的两个点,选了一个不符合的点,就要选另一个符合的点,这样连两条边 然后枚举所有议案的选和不选 ...
 - Django day 34 过滤课程,登录,redis,python操作redis
			
一:过滤课程, 二:登录 三:redis, 四:python操作redis
 - HTML和JSP的不同及优缺点
			
HTML(Hypertext Markup Language)文本标记语言,它是静态页面,和JavaScript一样解释性语言,为什么说是解释性语言呢?因为,只要你有一个浏览器那么它就可以正常显示出来 ...