小白求救:mac如何成功安装jieba

试了第一种方法如下,未遂。

Last login: Wed May  5 19:17:04 on ttys000

 

The default interactive shell is now zsh.

To update your account to use zsh, please run `chsh -s /bin/zsh`.

For more details, please visit https://support.apple.com/kb/HT208050.

wushuangdeMacBook-Pro:~ wushuang$ pip3 install jieba

Collecting jieba

  Downloading jieba-0.42.1.tar.gz (19.2 MB)

     |████▊                           | 2.8 MB 6.3 kB/s eta 0:43:12

ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.

    jieba from https://files.pythonhosted.org/packages/c6/cb/18eeb235f833b726522d7ebed54f2278ce28ba9438e3135ab0278d9792a2/jieba-0.42.1.tar.gz#sha256=055ca12f62674fafed09427f176506079bc135638a14e23e25be909131928db2:

        Expected sha256 055ca12f62674fafed09427f176506079bc135638a14e23e25be909131928db2

             Got        64b9fa946f872284520fdcc8d0e920f2359f69bdf96dce88d4955a8b5138bc59

又试了第二种方法,https://www.jianshu.com/p/6b391dff067a   还是未遂。。。泪奔

Last login: Wed May  5 19:34:19 on ttys000

 

The default interactive shell is now zsh.

To update your account to use zsh, please run `chsh -s /bin/zsh`.

For more details, please visit https://support.apple.com/kb/HT208050.

wushuangdeMacBook-Pro:~ wushuang$ curl https://bootstrap.pypa.io/get-pip.py | python3

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

100 1891k  100 1891k    0     0   920k      0  0:00:02  0:00:02 --:--:--  920k

Collecting pip

  Downloading pip-21.1.1-py3-none-any.whl (1.5 MB)

     |███████████▋                    | 563 kB 8.1 kB/s eta 0:02:03ERROR: Exception:

Traceback (most recent call last):

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_vendor/urllib3/response.py", line 438, in _error_catcher

    yield

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_vendor/urllib3/response.py", line 519, in read

    data = self._fp.read(amt) if not fp_closed else b""

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_vendor/cachecontrol/filewrapper.py", line 62, in read

    data = self.__fp.read(amt)

  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 455, in read

    n = self.readinto(b)

  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 499, in readinto

    n = self.fp.readinto(b)

  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/socket.py", line 704, in readinto

    return self._sock.recv_into(b)

  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1241, in recv_into

    return self.read(nbytes, buffer)

  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/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 "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_internal/cli/base_command.py", line 180, in _main

    status = self.run(options, args)

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_internal/cli/req_command.py", line 204, in wrapper

    return func(self, options, args)

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_internal/commands/install.py", line 318, in run

    requirement_set = resolver.resolve(

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_internal/resolution/resolvelib/resolver.py", line 127, in resolve

    result = self._result = resolver.resolve(

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_vendor/resolvelib/resolvers.py", line 473, in resolve

    state = resolution.resolve(requirements, max_rounds=max_rounds)

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_vendor/resolvelib/resolvers.py", line 341, in resolve

    name, crit = self._merge_into_criterion(r, parent=None)

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_vendor/resolvelib/resolvers.py", line 172, in _merge_into_criterion

    if not criterion.candidates:

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_vendor/resolvelib/structs.py", line 139, in __bool__

    return bool(self._sequence)

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in __bool__

    return any(self)

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_internal/resolution/resolvelib/found_candidates.py", line 129, in <genexpr>

    return (c for c in iterator if id(c) not in self._incompatible_ids)

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_internal/resolution/resolvelib/found_candidates.py", line 33, in _iter_built

    candidate = func()

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_internal/resolution/resolvelib/factory.py", line 200, in _make_candidate_from_link

    self._link_candidate_cache[link] = LinkCandidate(

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_internal/resolution/resolvelib/candidates.py", line 306, in __init__

    super().__init__(

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_internal/resolution/resolvelib/candidates.py", line 151, in __init__

    self.dist = self._prepare()

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_internal/resolution/resolvelib/candidates.py", line 234, in _prepare

    dist = self._prepare_distribution()

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_internal/resolution/resolvelib/candidates.py", line 317, in _prepare_distribution

    return self._factory.preparer.prepare_linked_requirement(

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_internal/operations/prepare.py", line 508, in prepare_linked_requirement

    return self._prepare_linked_requirement(req, parallel_builds)

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_internal/operations/prepare.py", line 550, in _prepare_linked_requirement

    local_file = unpack_url(

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_internal/operations/prepare.py", line 239, in unpack_url

    file = get_http_url(

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_internal/operations/prepare.py", line 102, in get_http_url

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

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_internal/network/download.py", line 157, in __call__

    for chunk in chunks:

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_internal/cli/progress_bars.py", line 152, in iter

    for x in it:

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_internal/network/utils.py", line 62, in response_chunks

    for chunk in response.raw.stream(

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_vendor/urllib3/response.py", line 576, in stream

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

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/pip.zip/pip/_vendor/urllib3/response.py", line 541, in read

    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)

  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/contextlib.py", line 135, in __exit__

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

  File "/var/folders/tc/bpq_x9bx139gdj6cdbg1y1hr0000gn/T/tmpfx3na4tm/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.

wushuangdeMacBook-Pro:~ wushuang$

 

未遂笑死

https://www.zhihu.com/question/321345570

在cmd进到Scripts文件下,pip install jieba ,下载一半不到报错,timeout。

直接下太慢了,用镜像秒完成。

pip install -i https://mirrors.aliyun.com/pypi/simple/ jieba

https://blog.csdn.net/qq_42145681/article/details/109187510?spm=1001.2014.3001.5502

您好,我是有问必答小助手,您的问题已经有小伙伴解答了,您看下是否解决,可以追评进行沟通哦~

如果有您比较满意的答案 / 帮您提供解决思路的答案,可以点击【采纳】按钮,给回答的小伙伴一些鼓励哦~~

ps:问答VIP仅需29元,即可享受5次/月 有问必答服务,了解详情>>>https://vip.csdn.net/askvip?utm_source=1146287632

非常感谢您使用有问必答服务,为了后续更快速的帮您解决问题,现诚邀您参与有问必答体验反馈。您的建议将会运用到我们的产品优化中,希望能得到您的支持与协助!

速戳参与调研>>>https://t.csdnimg.cn/Kf0y