如何更改python的默认gcc编译器
我已经在我的计算机上安装了GCC4.9.2(MacOSX 10.10,64位),而GCC4.2版本在Python环境中显示。我不知道为什么会这样 我在调用numpy.f2py函数时遇到了一些问题,我认为这可能与不兼容的gcc编译器有关 1.Python外壳如何更改python的默认gcc编译器,python,python-2.7,gcc,fortran,gfortran,Python,Python 2.7,Gcc,Fortran,Gfortran,我已经在我的计算机上安装了GCC4.9.2(MacOSX 10.10,64位),而GCC4.2版本在Python环境中显示。我不知道为什么会这样 我在调用numpy.f2py函数时遇到了一些问题,我认为这可能与不兼容的gcc编译器有关 1.Python外壳 ▶ python Python 3.5.5 | packaged by conda-forge | (default, Jul 23 2018, 23:45:11) [GCC 4.2.1 Compatible Apple LLVM 6.1.
▶ python
Python 3.5.5 | packaged by conda-forge | (default, Jul 23 2018, 23:45:11)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
2.候机楼
▶ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin14.0.0/4.9.2/lto-wrapper
Target: x86_64-apple-darwin14.0.0
Configured with: ../gcc-4.9-20141029/configure --enable-languages=c++,fortran
Thread model: posix
gcc version 4.9.2 20141029 (prerelease) (GCC)
我认为这个问题可能是因为gcc编译器是在python之后安装的。如何解决这个问题,希望得到您的建议。我相信
[GCC 4.2.1兼容的Apple LLVM 6.1.0(clang-602.0.53)]
当您启动python交互式shell时,您得到的是用于编译python解释器的编译器,它与f2py使用的编译器无关