如何在pipenv中使用git?

問題描述 投票:0回答:1
  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 shell內時,我仍要使用pipenv install git來使用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的?

git pipenv
1個回答
0
投票

不需要在git中安裝pipenv。您只需在目錄中包含git repo。該目錄將包含您的pipenv

git shell之外運行pipenv。 Shell是用來管理您的環境的捕鱼游戏能赚钱的捕鱼游戏能赚钱的,但是git控制著您的源代碼所在的目錄。


推薦問答