鱼C论坛

 找回密码
 立即注册
查看: 1231|回复: 8

[已解决]pyecharts的安装报错

[复制链接]
发表于 2020-8-22 09:50:13 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
报错代码
C:\Users\asus>pip install pyecharts
Collecting pyecharts
  Downloading https://files.pythonhosted.org/p ... .1-py3-none-any.whl (134kB)
     |████████████████████████████████| 143kB 3.2kB/s
Collecting simplejson (from pyecharts)
  Downloading https://files.pythonhosted.org/p ... ejson-3.17.2.tar.gz (83kB)
     |████████████████████████████████| 92kB 4.0kB/s
Collecting jinja2 (from pyecharts)
  Downloading https://files.pythonhosted.org/p ... y2.py3-none-any.whl (125kB)
     |████████████████████████████████| 133kB 3.6kB/s
Collecting prettytable (from pyecharts)
  Downloading https://files.pythonhosted.org/p ... table-0.7.2.tar.bz2
Collecting MarkupSafe>=0.23 (from jinja2->pyecharts)
  Downloading https://files.pythonhosted.org/p ... -cp38-win_amd64.whl
Installing collected packages: simplejson, MarkupSafe, jinja2, prettytable, pyecharts
  Running setup.py install for simplejson ... done
  Running setup.py install for prettytable ... done
Successfully installed MarkupSafe-1.1.1 jinja2-2.11.2 prettytable-0.7.2 pyecharts-1.8.1 simplejson-3.17.2
WARNING: You are using pip version 19.2.3, however version 20.2.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

C:\Users\asus>python -m pip install --upgrade pip
Collecting pip
  Downloading https://files.pythonhosted.org/p ... y2.py3-none-any.whl (1.5MB)
     |███████████                     | 522kB 5.3kB/s eta 0:03:05ERROR: Exception:
Traceback (most recent call last):
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_vendor\urllib3\response.py", line 397, in _error_catcher
    yield
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_vendor\urllib3\response.py", line 479, in read
    data = self._fp.read(amt)
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
    data = self.__fp.read(amt)
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 454, in read
    n = self.readinto(b)
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 498, in readinto
    n = self.fp.readinto(b)
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\socket.py", line 669, in readinto
    return self._sock.recv_into(b)
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 1099, 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\asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_internal\cli\base_command.py", line 188, in main
    status = self.run(options, args)
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_internal\commands\install.py", line 345, in run
    resolver.resolve(requirement_set)
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_internal\legacy_resolve.py", line 196, in resolve
    self._resolve_one(requirement_set, req)
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_internal\legacy_resolve.py", line 359, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_internal\legacy_resolve.py", line 305, in _get_abstract_dist_for
    abstract_dist = self.preparer.prepare_linked_requirement(
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_internal\operations\prepare.py", line 195, in prepare_linked_requirement
    unpack_url(
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_internal\download.py", line 1058, in unpack_url
    unpack_http_url(
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_internal\download.py", line 920, in unpack_http_url
    from_path, content_type = _download_http_url(link,
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_internal\download.py", line 1152, in _download_http_url
    _download_url(resp, link, content_file, hashes, progress_bar)
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_internal\download.py", line 861, in _download_url
    hashes.check_against_chunks(downloaded_chunks)
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_internal\utils\hashes.py", line 75, in check_against_chunks
    for chunk in chunks:
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_internal\download.py", line 829, in written_chunks
    for chunk in chunks:
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_internal\utils\ui.py", line 156, in iter
    for x in it:
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_internal\download.py", line 794, in resp_read
    for chunk in resp.raw.stream(
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_vendor\urllib3\response.py", line 531, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_vendor\urllib3\response.py", line 496, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "C:\Users\asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_vendor\urllib3\response.py", line 402, 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 19.2.3, however version 20.2.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

百度看了一圈,没有我这报错的解决方法,请问下载pyecharts安装包并解压后如何正确安装?
最佳答案
2020-8-22 13:18:50
python -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple

用这个试试吧https://blog.csdn.net/qq_39184753/article/details/107898193
百度一搜就有解决方法
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2020-8-22 13:07:10 From FishC Mobile | 显示全部楼层
本帖最后由 昨非 于 2020-8-22 13:12 编辑

我人傻了,更新timeout?
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-8-22 13:08:38 | 显示全部楼层
WARNING: You are using pip version 19.2.3, however version 20.2.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

这句话不是已经提示你了么,升级pip
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-8-22 13:11:24 | 显示全部楼层
pyecharts这玩意好像很坑,旧版本和新版本完全两码事,网上教程都是旧版本的,要注意了,要使用旧版本安装的时候要指定版本
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-8-22 13:13:35 From FishC Mobile | 显示全部楼层
疾风怪盗 发表于 2020-8-22 13:08
WARNING: You are using pip version 19.2.3, however version 20.2.2 is available.
You should consider ...

不对,他执行更新了,但是更新过程timeout超时了
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-8-22 13:16:08 | 显示全部楼层
昨非 发表于 2020-8-22 13:13
不对,他执行更新了,但是更新过程timeout超时了

socket.timeout: The read operation timed out

嗯,发现了,好像是超时了,那就换源呗
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-8-22 13:17:16 From FishC Mobile | 显示全部楼层
本帖最后由 昨非 于 2020-8-22 17:19 编辑

这样,以管理员身份运行cmd
然后:
python -m pip install -U --force-reinstall pip
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-8-22 13:18:50 | 显示全部楼层    本楼为最佳答案   
python -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple

用这个试试吧https://blog.csdn.net/qq_39184753/article/details/107898193
百度一搜就有解决方法
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-8-22 16:55:10 From FishC Mobile | 显示全部楼层
本帖最后由 悠悠2264 于 2020-8-22 16:58 编辑

下载超时,换国内镜像源即可
pip install pyecharts -i https://pypi.tuna.tsinghua.edu.cn/simple/

https://fishc.com.cn/thread-167155-1-1.html
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-1-19 08:18

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表