使用C++调用python库

1、将A电脑的"D:\Python\Python310"文件夹,直接拷贝到"D:\Python\Python310";

2、 配置系统环境变量;Path中添加:

注意:记住要在path的前面,前面不能有其他路径的python,后面有无所谓;

D:\Python\Python310
D:\Python\Python310\Scripts
D:\Python\Python310\Library\bin

3、直接运行代码;

如果运行代码报错:则执行下面的操作;

1、先安装python310的安装包;安装到"D:\Python\Python310"

2、配置系统环境变量;Path中添加:

注意:记住要在path的前面,前面不能有其他路径的python,后面有无所谓;

D:\Python\Python310
D:\Python\Python310\Scripts
D:\Python\Python310\Library\bin

3、安装第三方库

pip install --no-index --find-links=D:\Python\310-whl numpy
pip install --no-index --find-links=D:\Python\310-whl hdbscan
pip install --no-index --find-links=D:\Python\310-whl matplotlib
pip install --no-index --find-links=D:\Python\310-whl optuna
pip install --no-index --find-links=D:\Python\310-whl pandas

4、直接运行代码;

你可能感兴趣的:(windows)