python:如何将 python-config 更改为我当前的 python 版本

python: how to change python-config into my current python version

我的问题是,

如果我运行

which python 

它returns

/opt/anaconda3/bin/python

但是,如果我 运行

which python-config

它returns

/usr/bin/python-config

这是macbook内置的python2.7

如何将配置更改为我正在使用的当前 python?

检查/opt/anaconda3/bin中是否有python-configpython3-config。如果有一个名为 python3-config 的文件,您应该改为 运行 python3-config。如果没有 python3-config,可能您没有为您的 conda 环境安装 python-config。你可以 运行 pip install python-config(确保你在你的 anaconda 环境下 运行 pip)。