Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error compiling Cython file #79

Open
elizeng opened this issue Jun 9, 2023 · 0 comments
Open

Error compiling Cython file #79

elizeng opened this issue Jun 9, 2023 · 0 comments

Comments

@elizeng
Copy link

elizeng commented Jun 9, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant