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

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

转载于:https://www.cnblogs.com/feigen/p/9370535.html

python安装外部模块Django相关推荐

  1. Python 安装 xlsx模块

    为什么80%的码农都做不了架构师?>>>    Python 安装 xlsx模块 很多时候自动化测试时测试用例是写在excel中的如何读取转换成字典是一个比较关键的问题,使用pip命 ...

  2. Python安装torch模块报错处理

    Python安装torch模块报错处理 前言 安装 报错 解决 查找文档 解决方案 安装 torch 等待安装完成 安装 torchvision 提示安装完成 总结 前言 因python项目上线,需要 ...

  3. cx oracle 提示32位,Python安装cx_Oracle模块遇到的问题(32bit),pythoncx_oracle,环境:win7 32...

    Python安装cx_Oracle模块遇到的问题(32bit),pythoncx_oracle,环境:win7 32 环境: win7 32位系统 Python3.6 (32bit) 安装模块: cx ...

  4. Python 安装xlrd模块步骤

    Python 安装xlrd模块步骤 首先检查Python环境是否安装好,cmd命令检查() 官网下载xlrd ,https://pypi.org/project/xlrd/#files ![(http ...

  5. python中外部模块不用导入可以直接使用吗_python引入导入自定义模块和外部文件...

    python引入导入自定义模块和外部文件:项目中想使用以前的代码,或者什么样的需求致使你需要导入外部的包. 如果是web 下,比如说django ,那么你新建一个app,把你需要导入的说用东东,都写到 ...

  6. python安装requests模块失败_No module named quot;Cryptoquot;,如何安装Python三方模块Crypto...

    前两天公司公司老总让我研究怎么用企业微信第三方应用进行官网对接,完成URL回调验证问题. 具体如何进行Python 的Django网站与企业微信第三方应用进行回调验证的博客地址为:https://ww ...

  7. python外部库是什么_如何使用Portable Python安装外部库?

    由于管理员权限,我无法在我的机器上安装Python,但我成功下载/打开了Portable Python.我在Windows 7 64位机器上.我怎样才能使用以前的外部库,比如Numpy或Gmpy? 解 ...

  8. python安装的模块在pycharm中能用吗_pycharm安装python模块

    原博文 2016-10-16 15:09 − 这个工具真的好好,真的很喜欢,它很方便,很漂亮,各种好 pycharm安装python模块:file-setting-搜索project inte OK. ...

  9. python安装mysqldb模块_Python的MySQLdb模块安装

    在配置Django时,选择的是mysql数据库,要安装MySQLdb模块,不过安装过程中,遇到了很多errors,记录一下. 系统:ubuntu 11.10 mysql:直接apt-get安装的,ve ...

  10. python安装mysqldb模块

    mysqldb模块已经很久没有在维护了,但是很多人习惯使用mysqldb.从官方下载的安装包是32位,而我们的系统都是64位的因此安装会找不到python的环境变量或会报下面错误 python ver ...

最新文章

  1. 有人认为,“中文编程”是解决中国程序员编程效率的秘密武器,请问它是一个“银弹”么?...
  2. 如何优雅地实施持续交付部署
  3. RecyclerView导包
  4. 《Java 核心技术卷1 第10版》学习笔记------对象克隆【对象拷贝】
  5. VTK:图片之ImageRFFT
  6. 专科学历事业单位工资计算机,事业单位人来告诉你:学历跟入编之后待遇关系有多大!很直接...
  7. 获取ClassLoader的途径
  8. 怎么判断冠词用a还是an_英文写作常见错误学习笔记 | 冠词
  9. 第七章:集成学习(利用AdaBoost元算法...)
  10. Spring Boot笔记-JPA中自定义@Query分页查询
  11. 注释,今晚我不关心代码,我只想你
  12. java设置按钮调用问题_按钮相关问题:尝试在空对象引用上调用虚方法
  13. oracle高压水位线,Oracle 高水位线详解(HWM)
  14. 【爬虫剑谱】二卷4章 实战篇-模拟登录铁路12306网站(滑块验证)
  15. 1.2 Filters
  16. 【随便唱唱】猫的报恩-幻化成风
  17. 1500_1763 全球统一 伊比利亚 俄罗斯 西欧
  18. 台式计算机投网设备,台式机无线投屏 4台电脑一起投屏
  19. 浅谈token是什么?
  20. alert 弹出框的操作

热门文章

  1. 《计算机网络(第7版)-谢希仁》期末复习
  2. 近几十年基础科学的停滞影响研究
  3. 用C++做数据分析 - 唐代诗人的朋友圈
  4. java连接mysql数据,实现快递单管理信息系统
  5. 远程访问服务器上的Jupyterlab
  6. html游戏官网制作 英雄联盟LOL游戏网站设计与实现 (web课程与设计)
  7. 边缘计算是什么?边缘计算系统的组成及概念
  8. html可以使用文本修饰标记定义,HTML标记功能详述-网站首页.ppt
  9. 火焰数据集 烟雾数据集 整理 下载 传百度网盘
  10. 史上最简单的制作安装系统U盘工具