从github尝试移植仓库时发生错误

2024-10-02 06:31:10 发布

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

我正试图使用的github代码位于here。你知道吗

我正在尝试运行params.py,这是一个代码,它将获取一个二进制文件并将其转换,以便我可以绘制它(或者我认为是这样)。你知道吗

我试着跑:

pip install git+https://github.com/PX4/pyulog.git

但是,这给了我一个错误:

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

Tags: installpip代码pyhttpsgitbuildgithub
1条回答
网友
1楼 · 发布于 2024-10-02 06:31:10

Pip install尝试从以下位置安装模块:

  • 使用需求说明符的PyPI(和其他索引)。你知道吗
  • VCS项目URL。你知道吗
  • 本地项目目录。你知道吗
  • 本地或远程源存档。你知道吗

在查看要安装的项目时,pip按以下顺序检查每个项目的类型:

  • 项目或存档URL。你知道吗
  • 本地目录(必须包含设置.py,否则pip将报告错误)。你知道吗
  • 本地文件(sdist或wheel格式存档,遵循这些格式的命名约定)。你知道吗
  • PEP 440中规定的要求。你知道吗

在您的情况下,git repo不符合要求。它没有设置.py这就是为什么会出现错误。
相反,请尝试在本地计算机上克隆repo。你知道吗

相关问题 更多 >

    热门问题