简体   繁体   English

如何使用python3在Mac OS X上构建simuPOP?

[英]How to build simuPOP on Mac OS X with python3?

I spent a full week trying to find out how to fix this problem, but I can't figure out how to do it. 我花了整整一周的时间试图找出解决问题的方法,但我不知道该如何解决。 I get the following error: 我收到以下错误:

MacBook-Pro-van-Hakim:Modules MvZB$ tar zxf simuPOP-1.0.6-src.tar.gzMacBook-Pro-van-Hakim:Modules MvZB$ cd simuPOP-1.0.6MacBook-Pro-van-Hakim:simuPOP-1.0.6 MvZB$ sudo python3 setup.py installPassword:
fail to import distribute/setuptools, build the program with distutils
running install
running build
running build_py
creating build/lib.macosx-10.6-intel-3.2
copying simuOpt.py -> build/lib.macosx-10.6-intel-3.2
creating build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/__init__.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/utils.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/plotter.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/sampling.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/sandbox.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/simuPOP_std.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/simuPOP_op.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/simuPOP_la.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/simuPOP_laop.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/simuPOP_ba.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/simuPOP_baop.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/gsl.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
Skipping implicit fixer: buffer
Skipping implicit fixer: idioms
Skipping implicit fixer: set_literal
Skipping implicit fixer: ws_comma
running build_ext
building 'simuPOP._gsl' extension
creating build/temp.macosx-10.6-intel-3.2
creating build/temp.macosx-10.6-intel-3.2/gsl
creating build/temp.macosx-10.6-intel-3.2/gsl/sys
creating build/temp.macosx-10.6-intel-3.2/gsl/complex
creating build/temp.macosx-10.6-intel-3.2/gsl/specfunc
creating build/temp.macosx-10.6-intel-3.2/gsl/cdf
creating build/temp.macosx-10.6-intel-3.2/src
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -Igsl -Igsl/specfunc -Ibuild -I. -I/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m -c gsl/error.c -o build/temp.macosx-10.6-intel-3.2/gsl/error.o
unable to execute gcc-4.2: No such file or directory
error: command 'gcc-4.2' failed with exit status 1

When I first saw this error, it apeared no compiler was installed on my Mac. 当我第一次看到此错误时,它提示我的Mac没有安装编译器。 For this, I installed Xcode 4.2 for Snow Leopard, and should now have a gcc compiler. 为此,我为Snow Leopard安装了Xcode 4.2,现在应该具有gcc编译器。 The threads on this forum with similar error reports are highly specific, which makes it very hard for a newb like me to extrapolate a proper solution for my problem from an existing case. 该论坛上带有类似错误报告的主题是高度特定的,这使得像我这样的新手很难从现有案例中推断出适合我的问题的解决方案。 I'm using Mac OSX 10.6.8 with python3.2.2 64/32 bit version. 我正在将Mac OSX 10.6.8与python3.2.2 64/32位版本一起使用。 Could someone help me out? 有人可以帮我吗? I'm even downloading Xcode 4.0 and try if this causes the problem, without knowing if this might solve the problem. 我什至正在下载Xcode 4.0,然后尝试如果这会导致问题,而不知道这是否可以解决问题。

Thanks! 谢谢!

EDIT: Xcode 4.0.1. 编辑:Xcode 4.0.1。 does not solve this problem. 无法解决此问题。

The immediate issue you are seeing with Xcode 4.2 is that gcc-4.2 is no longer is supplied by Apple with that release. 您在Xcode 4.2上看到的直接问题是该版本的Apple不再提供gcc-4.2。 Installing earlier versions of Xcode, like the standard Xcode 3.2.6 for OS X 10.6 should solve that problem. 安装早期版本的Xcode,例如用于OS X 10.6的标准Xcode 3.2.6,应该可以解决该问题。 You can download Xcode 3 after free registration at the Apple Developer website (http://developer.apple.com/resources/). 在Apple Developer网站(http://developer.apple.com/resources/)免费注册后,您可以下载Xcode 3。 But, even with gcc-4.2 available, I had compile errors when using Python 3.2. 但是,即使有可用的gcc-4.2 ,使用Python 3.2时我也会出现编译错误。 Python 2.7 seemed to work better. Python 2.7似乎工作得更好。 I know nothing about simuPop but it obviously has a very complex build system. 我对simuPop一无所知,但是它显然具有非常复杂的构建系统。 I think you have a better chance of success if you direct your questions to the simuPOP mailing list here . 我认为你有一个更好的成功机会,如果你直接您的问题到simuPOP邮件列表在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM