gpt4 book ai didi

git - 如何将 git 与 pipenv 一起使用?

转载 作者:行者123 更新时间:2023-12-02 00:06:28 24 4
gpt4 key购买 nike

  1. 在我的主系统上,我已经安装了 git dpkg。

    $ dpkg -l | grep git
    ii git 1:2.25.1-1~ppa0~ubuntu18.04.1 amd64 fast, scalable, distributed revision control system
    ii git-man 1:2.25.1-1~ppa0~ubuntu18.04.1 all fast, scalable, distributed revision control system (manual pages)

    我是否仍然执行 pipenv install git 以在 pipenv shell 中使用 git?我确实尝试在具有 pipenv shell 的目录中安装 git。虽然写成功了,但是还有其他的警告和错误。

    $ pipenv install git
    Installing git…
    Adding git to Pipfile's [packages]…
    ✔ Installation Succeeded
    Pipfile.lock (427769) out of date, updating to (affaee)…
    Locking [dev-packages] dependencies…
    Locking [packages] dependencies…
    ✘ Locking Failed!
    [pipenv.exceptions.ResolutionFailure]: File "~/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 69, in resolve
    [pipenv.exceptions.ResolutionFailure]: req_dir=requirements_dir
    [pipenv.exceptions.ResolutionFailure]: File "~/.local/lib/python3.6/site-packages/pipenv/utils.py", line 726, in resolve_deps
    [pipenv.exceptions.ResolutionFailure]: req_dir=req_dir,
    [pipenv.exceptions.ResolutionFailure]: File "~/.local/lib/python3.6/site-packages/pipenv/utils.py", line 480, in actually_resolve_deps
    [pipenv.exceptions.ResolutionFailure]: resolved_tree = resolver.resolve()
    [pipenv.exceptions.ResolutionFailure]: File "~/.local/lib/python3.6/site-packages/pipenv/utils.py", line 395, in resolve
    [pipenv.exceptions.ResolutionFailure]: raise ResolutionFailure(message=str(e))
    [pipenv.exceptions.ResolutionFailure]: pipenv.exceptions.ResolutionFailure: ERROR: ERROR: Could not find a version that matches git
    [pipenv.exceptions.ResolutionFailure]: No versions found
    [pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
    First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
    Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
    Hint: try $ pipenv lock --pre if it is a pre-release dependency.
    ERROR: ERROR: Could not find a version that matches git
    No versions found
    Was https://pypi.org/simple reachable?
    [pipenv.exceptions.ResolutionFailure]: req_dir=requirements_dir
    [pipenv.exceptions.ResolutionFailure]: File "~/.local/lib/python3.6/site-packages/pipenv/utils.py", line 726, in resolve_deps
    [pipenv.exceptions.ResolutionFailure]: req_dir=req_dir,
    [pipenv.exceptions.ResolutionFailure]: File "~/.local/lib/python3.6/site-packages/pipenv/utils.py", line 480, in actually_resolve_deps
    [pipenv.exceptions.ResolutionFailure]: resolved_tree = resolver.resolve()
    [pipenv.exceptions.ResolutionFailure]: File "~/.local/lib/python3.6/site-packages/pipenv/utils.py", line 395, in resolve
    [pipenv.exceptions.ResolutionFailure]: raise ResolutionFailure(message=str(e))
    [pipenv.exceptions.ResolutionFailure]: pipenv.exceptions.ResolutionFailure: ERROR: ERROR: Could not find a version that matches git
    [pipenv.exceptions.ResolutionFailure]: No versions found
    [pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
    First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
    Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
    Hint: try $ pipenv lock --pre if it is a pre-release dependency.
    ERROR: ERROR: Could not find a version that matches git
    No versions found
    Was https://pypi.org/simple reachable?
  2. 我是在 pipenv shell 内部还是外部运行 git?

最佳答案

不需要在您的pipenv 中安装git。你只会在目录中有 git repo。该目录将包含您的 pipenv

pipenv 外壳之外运行 git。 shell 用于管理您的环境,但 git 控制维护源代码的目录。

关于git - 如何将 git 与 pipenv 一起使用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60447672/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com