已有184人关注
为什么我安不上pandas?
发表在Python图书答疑 2021-10-19 《Python数据分析从入门到实践》第3章 Pandas入门 41页-43页
是否精华
版块置顶:

老师们好:我按照书上41页安装pandas,就是一直安不上,而且检查出来一堆错误代码:

"C:\Users\netwo\AppData\Local\Temp\pip-standalone-pip-nwk490et\__env_pip__.zip\pip\_internal\resolution\resolvelib\candidates.py", line 317, in _prepare_distribution

      return self._factory.preparer.prepare_linked_requirement(

    File "C:\Users\netwo\AppData\Local\Temp\pip-standalone-pip-nwk490et\__env_pip__.zip\pip\_internal\operations\prepare.py", line 508, in prepare_linked_requirement

      return self._prepare_linked_requirement(req, parallel_builds)

    File "C:\Users\netwo\AppData\Local\Temp\pip-standalone-pip-nwk490et\__env_pip__.zip\pip\_internal\operations\prepare.py", line 550, in _prepare_linked_requirement

      local_file = unpack_url(

    File "C:\Users\netwo\AppData\Local\Temp\pip-standalone-pip-nwk490et\__env_pip__.zip\pip\_internal\operations\prepare.py", line 239, in unpack_url

      file = get_http_url(

    File "C:\Users\netwo\AppData\Local\Temp\pip-standalone-pip-nwk490et\__env_pip__.zip\pip\_internal\operations\prepare.py", line 102, in get_http_url

      from_path, content_type = download(link, temp_dir.path)

    File "C:\Users\netwo\AppData\Local\Temp\pip-standalone-pip-nwk490et\__env_pip__.zip\pip\_internal\network\download.py", line 157, in __call__

      for chunk in chunks:

    File "C:\Users\netwo\AppData\Local\Temp\pip-standalone-pip-nwk490et\__env_pip__.zip\pip\_internal\cli\progress_bars.py", line 152, in iter

      for x in it:

    File "C:\Users\netwo\AppData\Local\Temp\pip-standalone-pip-nwk490et\__env_pip__.zip\pip\_internal\network\utils.py", line 62, in response_chunks

      for chunk in response.raw.stream(

    File "C:\Users\netwo\AppData\Local\Temp\pip-standalone-pip-nwk490et\__env_pip__.zip\pip\_vendor\urllib3\response.py", line 576, in stream

      data = self.read(amt=amt, decode_content=decode_content)

    File "C:\Users\netwo\AppData\Local\Temp\pip-standalone-pip-nwk490et\__env_pip__.zip\pip\_vendor\urllib3\response.py", line 512, in read

      with self._error_catcher():

    File "D:\360Downloads\lib\contextlib.py", line 153, in __exit__

      self.gen.throw(typ, value, traceback)

    File "C:\Users\netwo\AppData\Local\Temp\pip-standalone-pip-nwk490et\__env_pip__.zip\pip\_vendor\urllib3\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.

  WARNING: You are using pip version 21.1.2; however, version 21.3 is available.

  You should consider upgrading via the 'D:\培训资料\venv\Scripts\python.exe -m pip install --upgrade pip' command.

   比这个多了多,我也看不懂。然后直接找到快速示例1,也不能运行。请问大神们怎么回事????

2021-10-20 08:41:54编辑
分享到:
精彩评论 1
无语_mrkj
学分:3155 LV11
2021-10-20
沙发

从下面这行异常信息上看,应该网络连接超时了。

pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

因为这个模块的官网在国外,咱们国内访问可能会慢,您也可以试试在CMD命令窗口安装。这时如果还是可以在安装命令中添加清华源-i https://pypi.tuna.tsinghua.edu.cn/simple。

首页上一页 1 下一页尾页 1 条记录 1/1页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照