我尝试从github存储库进行pip-install (在可编辑模式下,但问题对于非可编辑模式也是相同的),但失败的原因如下:
$ pip install git+ssh:git@github.com/jupyterhub/nativeauthenticator.git#egg=nativeauthenticator
Collecting nativeauthenticator
Cloning ssh:///git@github.com/jupyterhub/nativeauthenticator.git to /tmp/pip-install-dqnyu101/nativeauthenticator_824b55eecd3440c08150d3a91a521c08
Running command git clone -q ssh:///git@github.com/jupyterhub/nativeauthenticator.git /tmp/pip-install-dqnyu101/nativeauthenticator_824b55eecd3440c08150d3a91a521c08
ssh: Could not resolve hostname ssh: Temporary failure in name resolution
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
WARNING: Discarding git+ssh:///git@github.com/jupyterhub/nativeauthenticator.git#egg=nativeauthenticator. Command errored out with exit status 128: git clone -q ssh:///git@github.com/jupyterhub/nativeauthenticator.git /tmp/pip-install-dqnyu101/nativeauthenticator_824b55eecd3440c08150d3a91a521c08 Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement nativeauthenticator (unavailable)
ERROR: No matching distribution found for nativeauthenticator (unavailable)问题似乎是一个虚假的斜杠(参见"Running command“行)。事实上,手动运行git clone -q ssh://git@github.com/jupyterhub/nativeauthenticator.git /tmp/pip-install-dqnyu101/nativeauthenticator_824b55eecd3440c08150d3a91a521c08运行得很好。使用git+https或git+git会产生非常相似的错误(但我真的想使用git+ssh)。这是一个bug,还是我做错了什么?
$ pip --version
pip 21.0.1 from ~/repo/github/nativeauthenticator_venv/lib/python3.6/site-packages/pip (python 3.6)发布于 2021-04-06 05:20:57
正确的语法是
pip install git+ssh://git@github.com/jupyterhub/nativeauthenticator.git#egg=jupyterhub-nativeauthenticatorhttps://stackoverflow.com/questions/66959617
复制相似问题