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,因此在许多情况下,它们可能指向相同的解释器和包管理器。
相关推荐
白杨SEO营销18 分钟前
白杨SEO:不到7天,白杨SEO博客网站百度搜索显示和排名恢复正常!顺带说说上海线下GEO聚会分享和播客红利
人工智能·搜索引擎·百度
ywyy679830 分钟前
推客小程序系统开发:全栈式技术解决方案与行业赋能实践
大数据·人工智能·微信小程序·小程序·系统·推客系统·推客小程序
TDengine (老段)1 小时前
TDengine 在新能源领域的价值
java·大数据·数据库·人工智能·时序数据库·tdengine·涛思数据
智合同(小智)1 小时前
《告别低效签约!智合同如何用AI重构商业“契约时代”》——解析智能合约技术的爆发与行业变革
大数据·人工智能·重构·智能合约·合同管理·智合同·ai合同
ywyy67982 小时前
「数智化聚合分销生态系统」定制开发:重构全渠道增长引擎
大数据·搜索引擎·微信小程序·小程序·系统·聚合分销系统·聚合分销
Yweir2 小时前
ElasticSearch 8.x 快速上手并了解核心概念
elasticsearch·搜索引擎
weixin_472339462 小时前
基于Elasticsearch的搜索引擎简介
大数据·elasticsearch·搜索引擎
MXsoft6182 小时前
监控易一体化运维:统计报表,为运维决策装上“智慧引擎”
大数据
Elastic 中国社区官方博客3 小时前
JavaScript 中使用 Elasticsearch 的正确方式,第一部分
大数据·开发语言·javascript·数据库·elasticsearch·搜索引擎·全文检索
ThomasChan1233 小时前
Win10 安装单机版ES(elasticsearch),整合IK分词器和安装Kibana
java·大数据·elasticsearch·搜索引擎·全文检索·jenkins·es