Python SSL root certificates

Python3.12安装好之后,pip仍然指向旧的3.11版本:

~ % pip --version      
pip 23.3.1 from /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip (python 3.11)

需要删除旧的3.11路径 (MAC 版本)

删除办法,打开终端窗口,然后输入:

open -e ~/.zprofile

并删除以下代码:

# Setting PATH for Python 3.11
# The original version is saved in .zprofile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.11/bin:${PATH}"
export PATH

关闭终端窗口,重新打开,重新执行pip命令

~ % pip --version
zsh: command not found: pip

发现找不到pip,解决办法,打开以下路径:/Library/Frameworks/Python.framework/Versions/3.12/bin

找到pip3或pip3.12,复制并重命名为pip,再次执行命令:

pip --version
pip 24.0 from /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip (python 3.12)

pip已经重新指向3.12!!!

同时可以将相同目录下的python3.12复制为python,以避免找不到python。

使用where python来查找python路径:

% where python
/Library/Frameworks/Python.framework/Versions/3.12/bin/python

同时在bin下也有python的踪迹:

% ls /usr/local/bin/python*
/usr/local/bin/python3			/usr/local/bin/python3.11-intel64
/usr/local/bin/python3-config		/usr/local/bin/python3.12
/usr/local/bin/python3-intel64		/usr/local/bin/python3.12-config
/usr/local/bin/python3.11		/usr/local/bin/python3.12-intel64

可使用rm命令删除不需要的python

Congratulations!  Python 3.12.3 for macOS 10.9 or later was successfully installed.

One more thing: to verify the identity of secure network connections, this Python needs a set of SSL root certificates.  You can download and install a current curated set from the Certifi project by double-clicking on the Install Certificates icon in the Finder window.  See the ReadMe file for more information.

This package will install Python 3.12.3 for macOS 10.9 or later for the following architecture(s): arm64, x86_64.


恭喜你!Python 3.12.3 for macOS 10.9或更高版本已成功安装。

还有一件事:为了验证安全网络连接的身份,这个Python需要一组SSL根证书。通过双击Finder窗口中的“安装证书”图标,可以从Certifi项目下载并安装当前的管理集。有关更多信息,请参阅ReadMe文件。

此包将为以下架构安装Python 3.12.3 for macOS 10.9或更高版本:arm64, x86_64。

Certificate verification and OpenSSL

This package includes its own private copy of OpenSSL 3.0.   The trust certificates in system and user keychains managed by the Keychain Access application and the security command line utility are not used as defaults by the Python ssl module.  A sample command script is included in /Applications/Python 3.12 to install a curated bundle of default root certificates from the third-party certifi package (certifi · PyPI).  Double-click on Install Certificates to run it.

证书验证和OpenSSL

这个包包含它自己的OpenSSL 3.0的私有副本。由Keychain Access应用程序和security命令行实用程序管理的系统和用户Keychain中的信任证书不会被Python ssl模块默认使用。/Applications/Python 3.12中包含一个示例命令脚本,用于从第三方证书包(certifi·PyPI)中安装默认根证书的管理包。双击Install Certificates来运行它。

The bundled pip has its own default certificate store for verifying download connections.

捆绑的pip有自己的默认证书存储,用于验证下载连接。

Install Options

You can control some aspects of what is installed by this package. To see the options, click on the Customize button in the Installation Type step of the macOS installer app.  Click on a package name in the list shown to see more information about that option,

您可以控制这个包安装的内容的某些方面。要查看选项,请单击macOS安装程序应用程序的安装类型步骤中的自定义按钮。单击显示列表中的软件包名称以查看有关该选项的更多信息。

Using IDLE or other Tk applications 

This package includes its own private version of Tcl/Tk 8.6. It does not use any system-supplied or third-party supplied versions of Tcl/Tk.

这个包包含它自己的专用版本Tcl/Tk 8.6。它不使用任何系统提供的或第三方提供的Tcl/Tk版本。

Due to new security checks on macOS 10.15 Catalina, when launching IDLE macOS may open a window with a message "Python" would like to access files in your Documents folder.  This is normal as IDLE uses your Documents folder as its default when opening and saving files; you can still choose other locations in the Open and Save file dialog windows.  Click on the OK button to proceed.

由于macOS 10.15 Catalina上新的安全检查,当启动IDLE时,macOS可能会打开一个窗口,提示“Python”想要访问文档文件夹中的文件。这是正常的,因为IDLE在打开和保存文件时使用文档文件夹作为默认值;您仍然可以在打开和保存文件对话框窗口中选择其他位置。单击OK按钮继续。

Apple Silicon Mac support

On Apple Silicon Macs, it is possible to run Python either with native ARM64 code or under Intel 64 emulation using Rosetta2. This option might be useful for testing or if binary wheels are not yet available with native ARM64 binaries.  To  easily force Python to run in emulation mode, invoke it from a command line shell with the python3-intel64 command instead of just python3.

在Apple Silicon mac上,既可以使用本地ARM64代码运行Python,也可以使用Rosetta2在Intel 64仿真下运行Python。此选项可能对测试有用,或者如果本机ARM64二进制文件还不能使用二进制轮。要轻松地强制Python以仿真模式运行,请使用python3-intel64命令而不是python3从命令行shell调用它。

Other changes

For other changes in this release, see the What's new section in the Documentation Set for this release and its Release Notes link at Download Python | Python.org.

certifi · PyPI

Project description

Certifi provides Mozilla’s carefully curated collection of Root Certificates for validating the trustworthiness of SSL certificates while verifying the identity of TLS hosts. It has been extracted from the Requests project.

Certifi提供Mozilla精心策划的根证书集合,用于验证SSL证书的可信度,同时验证TLS主机的身份。它是从Requests项目中提取出来的。

Installation

certifi is available on PyPI. Simply install it with pip:

$ pip install certifi

Usage

To reference the installed certificate authority (CA) bundle, you can use the built-in function:

>>> import certifi>>> certifi.where()
'/usr/local/lib/python3.7/site-packages/certifi/cacert.pem'

Or from the command line:

$ python -m certifi
/usr/local/lib/python3.7/site-packages/certifi/cacert.pem

Enjoy!

Addition/Removal of Certificates

Certifi does not support any addition/removal or other modification of the CA trust store content. This project is intended to provide a reliable and highly portable root of trust to python deployments. Look to upstream projects for methods to use alternate trust.

Certifi不支持对CA信任存储库内容进行任何添加/删除或其他修改。该项目旨在为python部署提供可靠且高度可移植的信任根。在上游项目中寻找使用替代信任的方法。

Project details

Verified details

These details have been verified by PyPI

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/839372.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

解决脚本刷服务器导致卡顿宕机的问题

在互联网服务领域,自动化脚本的不当使用或恶意攻击可能会导致服务器资源被过度消耗,从而引发服务响应缓慢甚至系统崩溃。特别是在电商、游戏、社交平台等领域,这种现象尤为常见。本文将深入探讨脚本刷服的常见形式、其对服务器性能的影响&…

在Spring Boot项目中集成和使用MQTT

在物联网(IoT)应用中,MQTT(消息队列遥测传输)协议因其轻量级和高效性被广泛使用。在Spring Boot项目中,我们可以通过集成org.springframework.integration:spring-integration-mqtt依赖来实现对MQTT的支持。…

Android 日志等级设置

一、LOG等级设置 1、Java设置 系统Log等级 public static final String LOG_CMD_TAG = "persist.log.tag";public static void setSystemLogLevel(String level) {Log.d(TAG, "setSystemLogLevel: " + level);SystemProperties.set(LOG_CMD_TAG, level)…

计算机专业实习生应该去哪实习?

计算机专业实习生可以选择在各种不同类型的公司和组织中实习。我这里有一套编程入门教程,不仅包含了详细的视频讲解,项目实战。如果你渴望学习编程,不妨点个关注,给个评论222,私信22,我在后台发给你。 这取…

Harmony学习笔记一——项目创建及配置

文章基于Harmony Next Preview2 进行学习,其他版本可能会稍有不同 准备工作 由于目前Harmony Next仅有Preview版本,想要进行Harmony Next开发需要向华为申请权限,具体操作参考: https://developer.huawei.com/consumer/cn/forum/topic/02081…

MySQL查询---单、多表实例

目录 一、素材准备 建表 插入数据: 二、单表查询 三、多表查询 要求: 步骤: 1、建立新的数据库db_calss,以及按照要求建立student表 2.查看已经建立表的属性,并按照要求修改年龄字段属性 3.按照要求建立SC表 …

AI播客下载:Create Like the Greats(主题是AI和市场营销)

《Create Like the Greats》是由Ross Simmonds主持的播客,旨在深入探讨创业、创造过程中的各种问题和挑战。该播客专注于揭示成功创作者的背后故事和策略。 该播客的第一集详细讲述了MasterClass如何建立起一个价值28亿美元的教育科技帝国。这一集不仅展示了Master…

数据科学的守护者:数据治理与安全在大规模数据提取项目中的角色

数据科学的守护者:数据治理与安全在大规模数据提取项目中的角色 随着数据科学的迅猛发展,大规模数据提取项目已成为企业、研究机构和政府等各个领域不可或缺的一部分。然而,伴随着数据的快速增长和复杂性的增加,数据治理与安全问…

stm32学习-光敏传感器控制蜂鸣器

接线 GPIO配置 初始化GPIO 1.使用RCC开启GPIO时钟 void RCC_APB2PeriphClockCmd(uint32_t RCC_APB2Periph, FunctionalState NewState); 作用:外设时钟控制(根据外设连接的总线选择要开启的时钟) RCC_AHBPeriph/RCC_APB2Periph/RCC_APB1Periph&#x…

视觉里程计的融合方法及优缺点分析

视觉里程计是视觉slam的一部分,即前端部分,用于前端跟踪并建立局部地图。多用于重定位或辅助定位,常用的有特征点法,光流法和直接法,其区别和优缺点如下。 特征点法,需要计算特征点和描述子,计算…

Qt 文件模型(QFileSystemModel)详细介绍

一.定义 Qt提供了QFileSystemModel类,用于在Qt应用程序中展示文件系统的数据。QFileSystemModel类是QAbstractItemModel的子类,可以方便地将文件系统的文件和文件夹结构作为数据模型,供Qt的视图类(比如QTreeView、QListView等&…

5、HTTP header注入(详解)

1、知识补充 本篇主要演示user-Agent和Cookie注入 以下是一些可能的HTTP header注入点: User-Agent: 有些网站可能会记录并分析访问者的User-Agent字符串以了解用户的浏览器和设备信息。如果这些信息被用于动态生成SQL查询,并且没有进行适当的输入验证或…

卡到BUG了:删除重发白得积分(以前删除会扣减积分)

以前是:删除文章,积分减少,点赞积分减少,从回收站回复文章,积分恢复,点赞数恢复但点赞积分不恢复。也就是删除重发总积分减少点赞的积分,有损失。 今天是:删除文章,积分不…

【Android】Gradle插件全局配置/Gradle插件下载源配置

gradle插件概念 gradle发行包和gradle插件是两个东西,可以理解为maven版本与maven依赖项的关系。gradle插件由项目路径中的build.gradle文件进行管理,相当于pom.xmlsettings.xml,同时记录依赖项和依赖仓库。是一个依赖项,从指定仓…

检索增强生成RAG的概念及参考架构

大家好,自ChatGPT火爆以来,大语言模型(LLMs)驱动的智能应用如雨后春笋般涌现,迅速改变了我们与世界互动的方式。在众多智能AI应用架构中,RAG(检索增强生成)架构以其独特的优势和强大…

MySQL数据库单表查询中查询条件的写法

1.使用比较运算符作为查询条件 ; !; >; >; <; <; 如上图所示&#xff0c;可以使用命令select 字段&#xff0c;字段 from 表名 where Gender “M”; 即挑选出Gender “M” 的教师&#xff0c; 如上图所示&#xff0c;可以使用命令select 字段&#xff0c;…

Python | Leetcode Python题解之第107题二叉树的层序遍历II

题目&#xff1a; 题解&#xff1a; class Solution:def levelOrderBottom(self, root: TreeNode) -> List[List[int]]:levelOrder list()if not root:return levelOrderq collections.deque([root])while q:level list()size len(q)for _ in range(size):node q.popl…

QT7_视频知识点笔记_4_文件操作,Socket通信:TCP/UDP

1.事件分发器&#xff0c;事件过滤器&#xff08;重要程度&#xff1a;一般&#xff09; event函数 2.文件操作&#xff08;QFile&#xff09; 实现功能&#xff1a;点击按钮&#xff0c;弹出对话框&#xff0c;并且用文件类读取出内容输出显示在控件上。 #include <QFi…

bclinux基于欧拉(BigCloud Enterprise Linux For Euler)下安装mysql5.7

第一步&#xff1a;下载mysql5.7的rpm安装包 下载地址&#xff1a;https://dev.mysql.com/downloads/mysql/ 第二步&#xff1a;上传mysql安装包到Centos7的下 第三步&#xff1a;检查是否已经安装了mysql或者mariadb&#xff08;centos7默认安装&#xff09;&#xff0c;如已…

如何在 Git 中处理和解决分支合并冲突?

在Git中&#xff0c;当两个或多个分支尝试合并&#xff0c;而它们对同一个文件的同一部分进行了不同的修改时&#xff0c;就可能会发生合并冲突。解决这些冲突是合并过程中一个重要的步骤。以下是如何在Git中处理和解决分支合并冲突的基本步骤&#xff1a; 拉取并合并分支&…