微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在Windows LinkError上使用Anaconda发行版的%cython:命令'gcc'失败,退出状态为1

我已经看到了这个错误的类似的答案,但我是一个LinkError,所以我认为它可能有点不同,解决。 最重要的是,所有这些似乎相似的错误的答案是不同的。

我想通过ipython笔记本使用cython:

%load_ext cythonmagic %%cython cdef double f_typed(double x): return x * (x - 1) cpdef double integrate_f_typed(double a,double b,int N): cdef int i cdef double s,dx s = 0 dx = (b - a) / N for i in range(N): s += f_typed(a + i * dx) return s * dx

但似乎可能是东西不正确链接给出的错误…不知道去哪里看什么或做什么。

这里是错误日志:

我怎样才能得到Windows上的C + + char *格式当前窗口的标题

创build目录并导航到目录c ++

如何在Windows上限制底部窗口全屏最大位置

自己的窗体边框样式

捕获API /工具的平台详细信息 – 与Windows错误报告等效

--------------------------------------------------------------------------- LinkError Traceback (most recent call last) <ipython-input-6-b9b32dd293fb> in <module>() ----> 1 get_ipython().run_cell_magic(u'cython',u'',u'cdef double f_typed(double x):n return x * (x - 1)ncpdef double integrate_f_typed(double a,int N):n cdef int in cdef double s,dxns = 0n dx = (b - a) / Nn for i in range(N):ns += f_typed(a + i * dx)n return s * dx') C:Anacondalibsite-packagesIPythoncoreinteractiveshell.pyc in run_cell_magic(self,magic_name,line,cell) 2160 magic_arg_s = self.var_expand(line,stack_depth) 2161 with self.builtin_trap: -> 2162 result = fn(magic_arg_s,cell) 2163 return result 2164 C:Anacondalibsite-packagesIPythonextensionscythonmagic.pyc in cython(self,cell) C:Anacondalibsite-packagesIPythoncoremagic.pyc in <lambda>(f,*a,**k) 191 # but it's overkill for just that one bit of state. 192 def magic_deco(arg): --> 193 call = lambda f,**k: f(*a,**k) 194 195 if callable(arg): C:Anacondalibsite-packagesIPythonextensionscythonmagic.pyc in cython(self,cell) 266 build_extension.build_temp = os.path.dirname(pyx_file) 267 build_extension.build_lib = lib_dir --> 268 build_extension.run() 269 self._code_cache[key] = module_name 270 C:Anacondalibdistutilscommandbuild_ext.pyc in run(self) 337 338 # Now actually compile and link everything. --> 339 self.build_extensions() 340 341 def check_extensions_list(self,extensions): C:Anacondalibdistutilscommandbuild_ext.pyc in build_extensions(self) 446 447 for ext in self.extensions: --> 448 self.build_extension(ext) 449 450 def build_extension(self,ext): C:Anacondalibdistutilscommandbuild_ext.pyc in build_extension(self,ext) 528 debug=self.debug,529 build_temp=self.build_temp,--> 530 target_lang=language) 531 532 C:Anacondalibdistutilsccompiler.pyc in link_shared_object(self,objects,output_filename,output_dir,libraries,library_dirs,runtime_library_dirs,export_symbols,debug,extra_preargs,extra_postargs,build_temp,target_lang) 689 libraries,690 export_symbols,--> 691 extra_preargs,target_lang) 692 693 def link_executable(self,output_progname,output_dir=None,C:Anacondalibdistutilscygwinccompiler.pyc in link(self,target_desc,target_lang) 258 extra_postargs,259 build_temp,--> 260 target_lang) 261 262 # link () C:Anacondalibdistutilsunixccompiler.pyc in link(self,target_lang) 198 self.spawn(linker + ld_args) 199 except distutilsExecError,msg: --> 200 raise LinkError,msg 201 else: 202 log.debug("skipping %s (up-to-date)",output_filename) LinkError: command 'gcc' Failed with exit status 1

我正在使用:在Windows 7上使用Python 2.7.5的Cython 0.20和gcc 4.7(使用Anaconda python发行版安装)

禁用“Foo遇到问题,需要closures”窗口

如何使用SPI_SETWORKAREA标志调整桌面工作区的大小?

如何检查一个svn命令是否需要validation

为什么getsockopt返回一个错误

设置rails以查找LIBMysqL.dll的认位置

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐