我无法用Pip安装任何Github项目

2024-09-27 23:16:30 发布

您现在位置:Python中文网/ 问答频道 /正文

我不得不在Windows上重新安装许多库。当我想从github安装pycdc时

在windows上安装pycdc。在

pip安装git+https://github.com/zrax/pycdc.git

我得到:

FileNotFoundError:[Errno 2]没有这样的文件或目录:'C:\Users\TT\AppData\Local\Temp\pip-ashu2b4z-build\设置.py在

C:\Users\TT\unroll>pycdc .py
'pycdc' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\TT\unroll>pip install git+https://github.com/zrax/pycdc.git
Collecting git+https://github.com/zrax/pycdc.git
  Cloning https://github.com/zrax/pycdc.git to c:\users\TT\appdata\local\temp\pip-ashu2b4z-build
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\TT\Anaconda3\lib\tokenize.py", line 452, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\TT\\AppData\\Local\\Temp\\pip-ashu2b4z-build\\setup.py'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\TT\AppData\Local\Temp\pip-ashu2b4z-build\

C:\Users\TT\unroll>pip install git+https://github.com/zrax/pycdc.git

我觉得我丢失了一些依赖文件

我真后悔重新安装。python可能很好用,但设置起来却很糟糕

同时:

^{pr2}$

Tags: pippyhttpsgitbuildgithubcomlocal
2条回答

在您的需求中,将带有个人令牌的URL添加到github repo。在

munch
pprint
coloredlogs
git+https://104360bcf4d8a00198bd355d73110ba75866c3e8:@github.company.com/kubernetes-paas/paas-shared-modules.git@master

安装将使用https API而不是ssh,因为您无法提供密钥。在

^{pr2}$

看来你面临着两个不同的问题。 首先,对于pycdc: Pycdc似乎不是一个python包,所以用pip安装它是有意义的(但是逻辑上没有找到setup.py) 检查那里的github(https://github.com/zrax/pycdc)似乎你需要下载那里的源代码并构建它。在

第二,布拉科: 您试图通过ssh而不是https来安装它(就像您尝试使用pycdc一样)。如果尝试使用ssh,则需要使用ssh公钥配置github帐户。 错误git@github.com: Permission denied (publickey)表明您没有正确配置帐户 有关详细信息,请参阅:https://help.github.com/articles/connecting-to-github-with-ssh/

相关问题 更多 >

    热门问题