一、利用conda创建一个新的虚拟环境(最好依赖于python3.9),方便管理第三方库
参考conda使用指南:
创建虚拟环境后会生成一个文件,在D:\andconda\envs下
二、c++嵌入python环境
静态库文件:在D:\andconda\envs\py39的libs文件夹下(将python3.lib复制一份改名python3_d.lib,python39一样)
头文件:在D:\andconda\envs\py39的include文件夹下
三、基本语法
https://hkrb7870j3.feishu.cn/docx/VJ0hdyhWUofyw0xutfYcS1OGnvf
问题:Fatal Python error: failed to get the Python codec of the filesystem encoding
解决:将Lib文件夹、DLLs文件夹放在exe文件的目录下
四、python文件有第三方库?
https://blog.csdn.net/Boxingstar/article/details/120174676
五、打包
(1)py文件
(2)Lib文件夹
(3)DLLs文件夹
(4)exe
(5)python相关dll