栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

Python37.12源码安装(Win10,Viusual Studio 2019)

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Python37.12源码安装(Win10,Viusual Studio 2019)

源码下载

https://www.python.org/ftp/python/3.7.12/Python-3.7.12.tar.xz

1.解压python源码包,这是我解压的位置

D:_softpythonPython-3.7.12

2.提前准备好依赖库(../PCbuild/build.bat虽然会自行下载,但总是下载失败)

如果安装的不是3712,可能以下依赖库版本会不同

https://github.com/python/cpython-source-deps/archive/sqlite-3.31.1.0.zip
https://github.com/python/cpython-source-deps/archive/xz-5.2.2.zip
https://github.com/python/cpython-source-deps/archive/zlib-1.2.11.zip
https://github.com/python/cpython-bin-deps/archive/openssl-bin-1.1.1g.zip
https://github.com/python/cpython-bin-deps/archive/tcltk-8.6.9.0.zip

tcltk-8.6.9.0.zip没有翻墙,我估计下不下来,所以我分别下载了tcl869-src.zip、tk869-src.zip

然后把这两个包合成了tcltk-8.6.9.0.zip

将准备好的zip包放进../externals/zips,这样运行build.bat的时候就会跳过下载直接到解压步骤

3.更改VC解决方案,因为我安装的是VisualStudio2019,VC版本是v160,源码包里的工程是VC140的

用Visual Studio 2019打开工程../PCbuild/pcbuild.sln,菜单->项目->重定目标解决方案,会提示工程版本是一个低版本,安装所有VC版本通用解决方案,然后确定

右键点击pythononcore重新生成

 4.运行命令开始编译安装

先看命令行参数,打开cmd输入

D:_softpythonPython-3.7.12PCbuildbuild.bat -h

 执行命令选择安装64位的

D:_softpythonPython-3.7.12PCbuildbuild.bat -p x64

等待编译安装完成...

好了,安装完成了,运行D:_softpythonPython-3.7.12python.bat启动

源文件提供:

链接:https://pan.baidu.com/s/13nkZ4JV4RtwGfow1DudKBw 
提取码:gkrb 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/445413.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号