当我运行命令时
f2py --c -help-fcompiler
f2py打印以下输出,然后无限期挂起
Gnu95FCompiler instance properties:
archiver = ['/usr/bin/gfortran', '-cr']
compile_switch = '-c'
compiler_f77 = ['/usr/bin/gfortran', '-Wall', '-g', '-ffixed-form', '-
fno-second-underscore', '-fPIC', '-O3', '-funroll-loops']
compiler_f90 = ['/usr/bin/gfortran', '-Wall', '-g', '-fno-second-
underscore', '-fPIC', '-O3', '-funroll-loops']
compiler_fix = ['/usr/bin/gfortran', '-Wall', '-g', '-ffixed-form', '-
fno-second-underscore', '-Wall', '-g', '-fno-second-
underscore', '-fPIC', '-O3', '-funroll-loops']
libraries = ['gfortran']
library_dirs = ['/usr/lib/gcc/x86_64-linux-gnu/7', '/usr/lib/gcc/x86_64
-linux-gnu/7']
linker_exe = ['/usr/bin/gfortran', '-Wall', '-Wall']
linker_so = ['/usr/bin/gfortran', '-Wall', '-g', '-Wall', '-g', '-
shared']
object_switch = '-o '
ranlib = ['/usr/bin/gfortran']
version = LooseVersion ('7')
version_cmd = ['/usr/bin/gfortran', '-dumpversion']
当我用ctrl+c
手动终止进程时,它看起来像被卡在这里了:
TEST_ENV/lib/python3.6/site-packages/numpy/distutils/fcompiler/__init__.py", line 472, in customize
posix=(os.name == 'posix'))
File "/usr/lib/python3.6/shlex.py", line 305, in split
return list(lex)
File "/usr/lib/python3.6/shlex.py", line 295, in __next__
token = self.get_token()
File "/usr/lib/python3.6/shlex.py", line 105, in get_token
raw = self.read_token()
File "/usr/lib/python3.6/shlex.py"
这都是在一个干净的虚拟环境中使用numpy1.16.0
有人知道为什么会这样吗
这是numpy中的一个已知错误(已修复并移植到1.16.1):
见
https://github.com/numpy/numpy/pull/12843
原因是什么
在ubuntu18.04上无限期挂起是由于
shlex.split()
在None
上被调用当
show_fcompilers()
调用customize()
和self.command_vars.compiler_f77 = f77
,self.command_vars.compiler_f90 = None
时,这发生在fcompiler/__init__.py
的第471行相关问题 更多 >
编程相关推荐