提交 54b461ff authored 作者: bbabeshkin's avatar bbabeshkin

Fixes "-m32" not found error on Raspberry Pi 2

This fixes the "-m32" not found error on Raspberry Pi 2, when importing theano.
上级 9d9dc0ce
...@@ -12,7 +12,7 @@ import subprocess ...@@ -12,7 +12,7 @@ import subprocess
import sys import sys
import tempfile import tempfile
import time import time
import platform
import distutils.sysconfig import distutils.sysconfig
importlib = None importlib = None
...@@ -1765,8 +1765,8 @@ class GCC_compiler(object): ...@@ -1765,8 +1765,8 @@ class GCC_compiler(object):
# Figure out whether the current Python executable is 32 # Figure out whether the current Python executable is 32
# or 64 bit and compile accordingly. This step is ignored for ARM # or 64 bit and compile accordingly. This step is ignored for ARM
# architectures in order to make Theano compatible with the Raspberry # architectures in order to make Theano compatible with the Raspberry
# Pi. # Pi, and Raspberry Pi 2.
if not any(['arm' in flag for flag in cxxflags]): if not any(['arm' in flag for flag in cxxflags]) and platform.machine() != 'armv7l':
n_bits = local_bitwidth() n_bits = local_bitwidth()
cxxflags.append('-m%d' % n_bits) cxxflags.append('-m%d' % n_bits)
_logger.debug("Compiling for %s bit architecture", n_bits) _logger.debug("Compiling for %s bit architecture", n_bits)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论