Skip to content

Error compiling Cython file #79

@elizeng

Description

@elizeng

I encountered the follow error when running python3.7 setup.py build_ext --inplace in the /fastStructure/vars folder. Compilation worked fine in the /fastStructure/ folder...

Would appreciate any help to get this working!

running build_ext
skipping 'utils.c' Cython extension (up-to-date)
Compiling allelefreq.pyx because it changed.
Compiling marglikehood.pyx because it changed.
[1/2] Cythonizing allelefreq.pyx
/u/yxeng/.local/lib/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: ./allelefreq.pxd
  tree = Parsing.p_module(s, pxd, full_module_name)

Error compiling Cython file:
------------------------------------------------------------
...
        # use an iterative fixed-point solver to update parameter estimates.
        var_beta, var_gamma = self._unconstrained_solver(Dvarbeta, Dvargamma)

        # if a variable violates positivity constraint,
        # set it to an estimate from the previous update
        bad_beta = reduce(utils.OR,[(var_beta<=0),np.isnan(var_beta)])
                  ^
------------------------------------------------------------

allelefreq.pyx:148:19: undeclared name not builtin: reduce
Traceback (most recent call last):
  File "setup.py", line 25, in <module>
    ext_modules = cythonize(ext_modules)
  File "/u/yxeng/.local/lib/python3.7/site-packages/Cython/Build/Dependencies.py", line 1115, in cythonize
    cythonize_one(*args)
  File "/u/yxeng/.local/lib/python3.7/site-packages/Cython/Build/Dependencies.py", line 1238, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: allelefreq.pyx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions