当前位置: 首页 > article >正文

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,因此在许多情况下,它们可能指向相同的解释器和包管理器。


http://www.kler.cn/news/361330.html

相关文章:

  • idea(2017版)创建项目的搭建方式
  • 第23章 - Elasticsearch 洞悉你的查询:如何在上线前发现潜在问题!
  • C#第6讲:集合字典
  • 【JPCS独立出版 | 福州大学主办 | 有确定的ISSN号】第三届可再生能源与电气科技国际学术会议(ICREET 2024)
  • 第十四章_File类与IO流
  • Python爬虫:API接口数据的“美食侦探”
  • 如何将markdown文件转换为pdf
  • flutter camera 插件相机不占满屏幕的问题
  • HDU The Boss on Mars(容斥原理)
  • DevExpress WPF v24.1新版亮点:PDF查看器、富文本编辑器功能升级
  • HTTP: GET vs POST
  • git安装与使用的史诗级教程【git推送文件到远程仓库(GitHub)教程】
  • 基于知识图的电影推荐系统
  • 记录一下乐鑫官方仓库ESP32-CAMERA,在使用esp32s3 wroom n16r8 CAM开发板时遇到的问题。
  • 刷题小记9:回溯
  • to_sql报错not all arguments converted during string formatting
  • 5.redis安装【Docker】
  • vscode 预览markdown 文件
  • 【C++干货篇】——类和对象的魅力(四)
  • 【C++贪心】1536. 排布二进制网格的最少交换次数|1880