我试图运行gnumake,但是它说找不到python.h文件,我认为这是python没有正确安装的结果。在
我努力寻找安装Python的最佳方式,最初是在3.6版本中通过macports安装它,然后在使用pycharm时安装anaconda,这使得安装包变得更加容易,尽管我觉得Python的安装可能会引起混乱。在
python --version
返回:Python 3.7.3
cat .bash_profile
返回:
##
# Your previous /Users/jonathandyke/.bash_profile file was backed up as /Users/jonathandyke/.bash_profile.macports-saved_2019-06-30_at_22:20:05
##
# MacPorts Installer addition on 2019-06-30_at_22:20:05: adding an appropriate PATH variable for use with MacPorts.
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
# Finished adapting your PATH environment variable for use with MacPorts.
# Setting PATH for Python 3.6
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
export PATH
# added by Anaconda3 2019.03 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
\eval "$__conda_setup"
else
if [ -f "/anaconda3/etc/profile.d/conda.sh" ]; then
. "/anaconda3/etc/profile.d/conda.sh"
CONDA_CHANGEPS1=false conda activate base
else
\export PATH="/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda init <<<````
你可能把头文件弄乱了。试试看
如果你在ubuntu上
apt-get install python3-dev
应该这样做相关问题 更多 >
编程相关推荐