Self-Operating Computer Framework项目部署日记

1. git clone的时候出现错误

复制代码
error: RPC failed;

curl 55 Failed sending data to the peer fatal:

expected flush after ref listings

问题分析:

因为你最初使用的 git clone https://github.com/OthersideAI/self-operating-computer.git 指向的是 别人 (OthersideAI)的仓库,而你没有对该仓库的直接写入权限。当你尝试推送更改或进行某些操作时,会遇到权限问题或相关错误。

解决方法:

先fork项目到自己的仓库,在电脑上创建一个gitRepo文件夹来存放项目,然后进入这个文件夹,先git init,然后git remote add origin https://github.com/OzBomboR/self-operating-computer.git,将origin指向了这个项目,最后在使用clone就可以了。

总结提问:

本地电脑的终端并没有登陆github,为什么他知道那个仓库是不是我的?

  1. 克隆时的权限检查: 当你使用 git clone 命令克隆一个仓库时,GitHub 会根据你提供的 URL 来确定你是否有权限访问该仓库。如果仓库是公共的,任何人都可以克隆,而对于私有仓库,只有有权限的用户才能访问。

  2. 使用 HTTPS 认证: 当你克隆一个私有仓库时,使用 HTTPS URL 时会提示你输入 GitHub 的用户名和密码(或个人访问令牌),以验证你的身份。此时,终端会询问你输入这些信息。

  3. 使用 SSH 认证: 如果你设置了 SSH 密钥并将公钥添加到 GitHub 账户中,Git 就可以使用 SSH 协议与 GitHub 通信。通过 SSH 连接时,Git 会自动识别你的身份,因此你不需要在终端中登录。

  4. 权限管理: GitHub 对每个用户的仓库权限是基于你的账户设置和权限分配的。当你尝试克隆、推送或其他操作时,GitHub 会根据你与该仓库的关系(如拥有者、合作者或公共访问)来决定是否允许该操作。

2. pip3 install . 出现问题

复制代码
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing /Users/2a/gitRepo
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [9 lines of output]
      Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
      WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))': /simple/setuptools/
      WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))': /simple/setuptools/
      WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))': /simple/setuptools/
      WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))': /simple/setuptools/
      WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))': /simple/setuptools/
      Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/setuptools/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.tuna.tsinghua.edu.cn', port=443): Max retries exceeded with url: /simple/setuptools/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) - skipping
      ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0 (from versions: none)
      ERROR: No matching distribution found for setuptools>=40.8.0
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

解决方法:直接绕过SSL

--trusted-host 选项用于告诉 pip,在连接到指定的主机时不进行 SSL 证书验证。这可以用于解决 SSL 证书验证失败的问题。具体来说:

  • --trusted-host pypi.tuna.tsinghua.edu.cn :表示将清华大学的 PyPI 镜像视为可信主机,这样在连接到该镜像时,pip 将不会检查 SSL 证书。

  • --trusted-host pypi.org:同样,表示将官方 PyPI 视为可信主机,避免在连接时进行证书验证。

使用场景

当你遇到 SSL 证书错误时,使用这个选项可以帮助你绕过这些错误,允许 pip 成功连接并下载所需的包。然而,这种方法并不安全,因为它会使你的连接暴露于中间人攻击等安全风险,因此只应在必要时临时使用。

总结

--trusted-host 允许你在遇到 SSL 问题时跳过安全检查,但要谨慎使用,确保在问题解决后恢复正常的安全连接方式。

3. pip install -r requirements.txt 失败

换镜像源+绕过ssl

4.pip和pip3 python和python3的区别

pip 和 pip3 以及 python 和 python3 之间的区别主要体现在它们所关联的 Python 版本上:

  1. pip 和 pip3:

    • pip 通常是指与系统默认的 Python 版本关联的包管理工具。对于一些系统(如 macOS 或某些 Linux 发行版),pip 可能指向 Python 2 的包管理器。
    • pip3 明确指向与 Python 3 版本关联的 pip。在需要同时使用 Python 2 和 Python 3 的环境中,使用 pip3 可以确保安装的库是为 Python 3 准备的。
  2. python 和 python3:

    • python 一般是指系统默认的 Python 解释器。对于一些旧的系统,这可能是 Python 2.x 版本。
    • python3 明确指向 Python 3 版本。使用 python3 确保您运行的是 Python 3 的解释器,这在某些系统中是必要的,尤其是在 Python 2 和 Python 3 同时存在的情况下。

总结

  • 使用 pip3 和 python3 可以确保您正在使用 Python 3 及其对应的包管理工具,避免与 Python 2 的混淆。
  • 在较新的系统中(如 Ubuntu 20.04 及之后的版本),python 和 pip 的默认版本已更改为 Python 3,因此在许多情况下,它们可能指向相同的解释器和包管理器。
相关推荐
阿里云大数据AI技术12 小时前
云栖实录|倍思科技 × 阿里云:让VOC洞察从“生成报告”走向“业务可用”
人工智能·elasticsearch·agent
数字新视界13 小时前
数据中心DCIM管理系统助力提升机房管理效率与安全性
大数据·人工智能·物联网·信息与通信·动环监控系统
阿里云大数据AI技术13 小时前
孩子王基于阿里云Data Agent的智能体实践:300+Agent 覆盖400+业务场景
大数据·人工智能·agent
大雪冬至6860612588716 小时前
【一次 Elasticsearch 高基数聚合慢查询的定位与优化】
elasticsearch
武子康16 小时前
H3-World 扩展跳跃与开门:新动作怎样进入训练数据?
大数据·人工智能·算法
Elasticsearch17 小时前
Elasticsearch:如何使用 Connectors 接入数据到 Elastic Agent builder 里进行企业搜索
elasticsearch
软件技术NINI17 小时前
DeepSeek 大模型落地应用实战指南
大数据·人工智能
wuyk55519 小时前
Spider-第11讲-工程化改造与可维护性
大数据·爬虫·elasticsearch·搜索引擎
新*20 小时前
Elasticsearch 索引别名入门:创建、路由、原子切换与几个常见误解
运维·后端·elasticsearch·索引别名
墨林陌21 小时前
AI 热点日报(2026-11-16):黄仁勋或重返英伟达,华为发具身世界模型,ChatGPT Wallet打通支付
大数据