Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/335.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
未找到python.h文件_Python_Python 3.x_Bash_Anaconda_Macports - Fatal编程技术网

未找到python.h文件

未找到python.h文件,python,python-3.x,bash,anaconda,macports,Python,Python 3.x,Bash,Anaconda,Macports,我试图运行GNUMake,但是它说它找不到python.h文件,我认为这是python没有正确安装的结果 我努力寻找安装Python的最佳方法,最初在3.6版中通过macports安装,然后在使用pycharm时安装anaconda,这使安装包变得更容易,尽管我觉得我的Python安装现在可能会引起混乱 python--version返回:python3.7.3 cat.bash\u profile返回: ## # Your previous /Users/jonathandyke/.bash_

我试图运行GNUMake,但是它说它找不到python.h文件,我认为这是python没有正确安装的结果

我努力寻找安装Python的最佳方法,最初在3.6版中通过macports安装,然后在使用pycharm时安装anaconda,这使安装包变得更容易,尽管我觉得我的Python安装现在可能会引起混乱

python--version
返回:
python3.7.3

cat.bash\u 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 <<<````

##
#您以前的/Users/jonathandyke/.bash\u配置文件已备份为/Users/jonathandyke/.bash\u profile.macports-saved\u 2019-06-30\u于\u 22:20:05
##
#2019-06-30_at_22:20:05添加MacPorts安装程序:添加用于MacPorts的适当路径变量。
导出路径=“/opt/local/bin:/opt/local/sbin:$PATH”
#已完成调整PATH环境变量以用于MacPorts。
#设置Python3.6的路径
#原始版本保存在.bash_profile.pysave中
PATH=“/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}”
导出路径
#由Anaconda3 2019.03安装程序添加
#>>>康达初始化>>>
# !! 此块中的内容由“conda init”管理!!
__conda_setup=“$(conda_报告_错误=false'/anaconda3/bin/conda'shell.bash hook 2>/dev/null)”
如果[$?-等式0];然后
\评估“$\uuu conda\u设置”
其他的
如果[-f”/anaconda3/etc/profile.d/conda.sh“;然后
. “/anaconda3/etc/profile.d/conda.sh”
CONDA_CHANGEPS1=假CONDA激活基
其他的
\导出路径=“/anaconda3/bin:$PATH”
fi
fi
未设置条件设置

#你可能把头文件搞砸了。试一试

brew uninstall python3
brew install python3
如果你在ubuntu上
apt get install python3 dev
应该这样做

你可能把头文件搞砸了。试一试

brew uninstall python3
brew install python3
如果你在ubuntu上
apt get install python3 dev
应该这样做

结果是什么:在cli中键入python?
python 3.7.3(默认值,2019年3月27日,16:54:48)[Clang 4.0.1(tags/RELEASE\u 401/final)]::Anaconda,Inc.关于达尔文键入“帮助”、“版权”、“信用”或“许可证”更多信息。
这不是在cli中运行“键入python”的结果。抱歉,误读,
python是散列的(/anaconda3/bin/python)
尝试安装
python3-devel
package。结果是什么:在cli中键入python?
python 3.7.3(默认,2019年3月27日,16:54:48)[Clang 4.0.1(tags/RELEASE\u 401/final)]:Anaconda,有关详细信息,请键入“帮助”、“版权”、“信用证”或“许可证”。
这不是在cli中运行“键入python”的结果。抱歉,误读,
python是散列的(/anaconda3/bin/python)
请尝试安装
python3-devel
软件包。