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
到此该模块安装成功,希望可以帮助到路过的小伙伴。。。。。。。
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 - ...
随机推荐
- Python开发【第*篇】【Xpath与lxml类库】
什么是XML XML 指可扩展标记语言(EXtensible Markup Language) XML 是一种标记语言,很类似 HTML XML 的设计宗旨是传输数据,而非显示数据 XML 的标签需要 ...
- 动态JSP的了解
一.JSP与HTML的根本区别 1..JSP(Java Server Page)页面是动态页,JSP页面是有JSP容器执行该页面的Java代码部分然后实时生成的HTML页面,因而说是动态页面.2..H ...
- ionic/cordova 真机调试
android下简单,连接手机后,直接: myProjectPath>ionic run android ios下比较麻烦点,要先装ios-deploy: sudo npm install - ...
- 在js中取选中的radio值
在js中取选中的radio值 <input type="radio" name="address" value="0" /> & ...
- beego3---gohttp底层实现
package main //gohttp底层实现,通过gohttp不是通过beego实现的输出 // import ( "io" "log" "ne ...
- nestedScrollview 嵌套使用recyclerview判断滑动到底部 (嵌套滑动导致 不能使用recyclerview的onscrolled监听)
NestedScrollView scroller = (NestedScrollView) findViewById(R.id.myScroll); if (scroller != null) { ...
- python库学习笔记——re库:正则表达式入门(一)
什么是正则表达式? 我们在处理文本文件的时候,会按照某种规则查找某些特定的字符串.比方我们希望从一堆电子档案中找到人员的电话号码整理成通讯录.于是,我们可以利用特定字符串的规律编程获得我们想要的信息. ...
- 【POJ 1804】 Brainman
[题目链接] 点击打开链接 [算法] 本题是一个很经典的问题 : 归并排序求逆序对数,可以用分治算法解决 分治,分而治之,分治算法的思想就是将一个问题转化为若干个子问题,对这些子问题分别求解,最后, ...
- 洛谷P4158 [SCOI2009]粉刷匠
传送门 设$dp[i][j][k][0/1]$表示在涂点$(i,j)$,涂了$k$次,当前点的颜色是否对,最多能刷对多少个格子 首先换行的时候肯定得多刷一次 然后是如果和前一个格子颜色相同,那么当前点 ...
- php 批量检测bom头,去除bom头工具
<?php //有些php文件由于不小心保存成了含bom头的格式而导致出现一系列的问题.以下是批量清除bom头的代码 if (isset ( $_GET ['dir'] )) { //confi ...