Skip to content

import error in python #49

@lwq-star

Description

@lwq-star

When I run import Rbeast as rb I get the following error:
My computer system is win10, and I run the code in spyder (python version is 3.12.8)

AttributeError                            Traceback (most recent call last)
AttributeError: _ARRAY_API not found

The above exception was the direct cause of the following exception:

SystemError                               Traceback (most recent call last)
Cell In[2], line 1
----> 1 import Rbeast as rb

File D:\app\miniforge3\envs\spyder_env\Lib\site-packages\Rbeast\__init__.py:31
      1 #https://gist.github.com/CMCDragonkai/510ce9456a0429f616baa243d1de3dbf
      2 #https://stackoverflow.com/questions/14295277/not-exporting-functions-from-python-module
      3 
   (...)
     27 
     28 #I think this form of using __init__.py is the best way. Users shouldn't need to use the from ... import syntax unless they need #to import specific bindings and don't want to use qualified modules.
---> 31 from .beast        import beast        as beast
     32 from .beast_irreg  import beast_irreg  as beast_irreg
     33 from .beast123     import beast123     as beast123

File D:\app\miniforge3\envs\spyder_env\Lib\site-packages\Rbeast\beast.py:1
----> 1 from .             import Rbeast as cb
      2 from .cvt_to_numpy import force_convert_to_numpy
      4 def beast(Y,                     \
      5           start            = 1,
      6           deltat           = 1,
   (...)
     37           dump_mcmc        = False,		  
     38           **kwargs ):

SystemError: initialization of Rbeast raised unreported exception

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