【问题标题】:PIP3 installation always tried to fetch packages from git-lfs directoryPIP3 安装总是试图从 git-lfs 目录中获取包
【发布时间】:2020-01-14 14:53:49
【问题描述】:

每次我尝试使用 pip3 安装包时,它都会尝试从 git-lfs 包存储库中获取包,这当然会返回 HTTP 404 错误。

我已经尝试卸载和安装 pip3。例如在尝试安装散景时:

pip3 install --default-timeout=1000 bokeh

我得到了异常:

    Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 353, in run
    wb.build(autobuilding=True)
  File "/usr/lib/python3/dist-packages/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 554, in _prepare_file
    require_hashes
  File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 278, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/usr/lib/python3/dist-packages/pip/index.py", line 465, in find_requirement
    all_candidates = self.find_all_candidates(req.name)
  File "/usr/lib/python3/dist-packages/pip/index.py", line 423, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
  File "/usr/lib/python3/dist-packages/pip/index.py", line 568, in _get_pages
    page = self._get_page(location)
  File "/usr/lib/python3/dist-packages/pip/index.py", line 683, in _get_page
    return HTMLPage.get_page(link, session=self.session)
  File "/usr/lib/python3/dist-packages/pip/index.py", line 795, in get_page
    resp.raise_for_status()
  File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/models.py", line 935, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://packagecloud.io/github/git-lfs/pypi/simple/bokeh/

【问题讨论】:

    标签: python python-3.x git pip git-lfs


    【解决方案1】:

    尝试从jupyter's website安装。

    请参阅这两个解决方案,一个是虚拟的,第二个是非虚拟的:/

    步骤:
    步骤 1. 使用pip3 install jupyter安装笔记本
    步骤 2. 使用 pip3 install bokeh
    安装散景 步骤 3. 使用 jupyter notebook
    启动 notebook (在最后一步执行此过程,无需激活虚拟环境)

    在虚拟环境中运行:
    第 1 步:激活您的虚拟环境
    步骤 2. 使用python -m pip install jupyter安装笔记本
    步骤 3. 使用 python -m pip install bokeh
    安装散景 第 4 步:使用 jupyter notebook 启动 notebook

    【讨论】:

    • 我无法使用 pip 安装任何东西
    • 看到我已经发布了新的答案,我遇到了同样的挑战,这只是一个棘手的代理设置。
    猜你喜欢
    • 2020-11-29
    • 2019-10-17
    • 2022-01-23
    • 2021-01-30
    • 1970-01-01
    • 1970-01-01
    • 2016-06-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多