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的区别

pippip3 以及 pythonpython3 之间的区别主要体现在它们所关联的 Python 版本上:

  1. pippip3

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

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

总结

  • 使用 pip3python3 可以确保您正在使用 Python 3 及其对应的包管理工具,避免与 Python 2 的混淆。
  • 在较新的系统中(如 Ubuntu 20.04 及之后的版本),pythonpip 的默认版本已更改为 Python 3,因此在许多情况下,它们可能指向相同的解释器和包管理器。
相关推荐
RunningShare34 分钟前
从“国庆景区人山人海”看大数据处理中的“数据倾斜”难题
大数据·flink
Hello.Reader1 小时前
Flink 执行模式在 STREAMING 与 BATCH 之间做出正确选择
大数据·flink·batch
文火冰糖的硅基工坊4 小时前
《投资-99》价值投资者的认知升级与交易规则重构 - 什么是周期性股票?有哪些周期性股票?不同周期性股票的周期多少?周期性股票的买入和卖出的特点?
大数据·人工智能·重构·架构·投资·投机
Elastic 中国社区官方博客4 小时前
Elasticsearch:使用推理端点及语义搜索演示
大数据·数据库·人工智能·elasticsearch·搜索引擎·ai·全文检索
数据智能老司机5 小时前
数据工程设计模式——冷热数据存储
大数据·设计模式·架构
Hello.Reader8 小时前
Flink 连接器与格式thin/uber 制品、打包策略与上线清单
大数据·flink
隐语SecretFlow8 小时前
【隐私计算科普】如何实现可证明安全?
大数据·开源·边缘计算
lisw059 小时前
AIoT(人工智能物联网):融合范式下的技术演进、系统架构与产业变革
大数据·人工智能·物联网·机器学习·软件工程
mtouch3339 小时前
GIS+VR地理信息虚拟现实XR MR AR
大数据·人工智能·ar·无人机·xr·vr·mr
数据智能老司机9 小时前
数据工程设计模式——实时摄取与处理
大数据·设计模式·架构