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

Cython 0.29 cannot import 'pythran_is_numpy_func_supported' #2680

Open
ojhall94 opened this Issue Oct 24, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@ojhall94

ojhall94 commented Oct 24, 2018

After installing Cython 0.29 I was unable to run the line:

from Cython.Build.Inline import _get_build_extension

The full error message is below. It appears, for example, when calling pystan.

<ipython-input-4-468ee6613710> in <module>()
----> 1 import pystan
      2 overwrite=False
      3 nocov = '''
      4 functions {
      5     real bailerjones_lpdf(real r, real L){             //This is our distance prior

~/.local/lib/python3.6/site-packages/pystan/__init__.py in <module>()
      7 import logging
      8 
----> 9 from pystan.api import stanc, stan
     10 from pystan.misc import read_rdump, stan_rdump, stansummary
     11 from pystan.diagnostics import check_hmc_diagnostics

~/.local/lib/python3.6/site-packages/pystan/api.py in <module>()
     14 import pystan._api  # stanc wrapper
     15 from pystan._compat import string_types, PY2
---> 16 from pystan.model import StanModel
     17 
     18 logger = logging.getLogger('pystan')

~/.local/lib/python3.6/site-packages/pystan/model.py in <module>()
     30 
     31 import Cython
---> 32 from Cython.Build.Inline import _get_build_extension
     33 from Cython.Build.Dependencies import cythonize
     34 

~/.local/lib/python3.6/site-packages/Cython/Build/Inline.py in <module>()
     15 from ..Compiler.Main import Context, CompilationOptions, default_options
     16 
---> 17 from ..Compiler.ParseTreeTransforms import (CythonTransform,
     18         SkipDeclarations, AnalyseDeclarationsTransform, EnvTransform)
     19 from ..Compiler.TreeFragment import parse_from_strings

~/.local/lib/python3.6/site-packages/Cython/Compiler/ParseTreeTransforms.py in <module>()
     12 from . import PyrexTypes
     13 from . import Naming
---> 14 from . import ExprNodes
     15 from . import Nodes
     16 from . import Options

~/.local/lib/python3.6/site-packages/Cython/Compiler/ExprNodes.py in <module>()
     44 from .DebugFlags import debug_disposal_code, debug_temp_alloc, \
     45     debug_coercion
---> 46 from .Pythran import (to_pythran, is_pythran_supported_type, is_pythran_supported_operation_type,
     47      is_pythran_expr, pythran_func_type, pythran_binop_type, pythran_unaryop_type, has_np_pythran,
     48      pythran_indexing_code, pythran_indexing_type, is_pythran_supported_node_or_none, pythran_type,

ImportError: cannot import name 'pythran_is_numpy_func_supported'

I also received the error message when attempting the following from commandline:

pip3 install cftime --user.

This has been resolved since reverting to version 0.28.5.

I am using Ubuntu 18.04 and Python 3.6.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment