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

OSError: no file with expected extension #1

Closed
popcsev opened this issue Dec 22, 2019 · 2 comments
Closed

OSError: no file with expected extension #1

popcsev opened this issue Dec 22, 2019 · 2 comments

Comments

@popcsev
Copy link

popcsev commented Dec 22, 2019

Hi, I ran into this problem on OS 10.15.1

---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-4-c84fd8138b3c> in <module>
----> 1 from cprior.models.bernoulli import BernoulliModel

/usr/local/lib/python3.7/site-packages/cprior/models/__init__.py in <module>
----> 1 from .bernoulli import BernoulliABTest
      2 from .bernoulli import BernoulliModel
      3 from .bernoulli import BernoulliMVTest
      4 
      5 from .binomial import BinomialABTest

/usr/local/lib/python3.7/site-packages/cprior/models/bernoulli.py in <module>
      8 import numpy as np
      9 
---> 10 from ..cdist import BetaABTest
     11 from ..cdist import BetaModel
     12 from ..cdist import BetaMVTest

/usr/local/lib/python3.7/site-packages/cprior/cdist/__init__.py in <module>
----> 1 from .beta import BetaABTest
      2 from .beta import BetaModel
      3 from .beta import BetaMVTest
      4 
      5 from .gamma import GammaABTest

/usr/local/lib/python3.7/site-packages/cprior/cdist/beta.py in <module>
     15 from scipy import stats
     16 
---> 17 from .._lib.cprior import beta_cprior
     18 from .base import BayesABTest
     19 from .base import BayesModel

/usr/local/lib/python3.7/site-packages/cprior/_lib/cprior.py in <module>
     21     cprior = npct.load_library("_cprior.so", libabspath)
     22 else:
---> 23     cprior = npct.load_library("cprior.dll", libabspath)
     24 
     25 

/usr/local/lib/python3.7/site-packages/numpy/ctypeslib.py in load_library(libname, loader_path)
    155                     raise
    156         ## if no successful return in the libname_ext loop:
--> 157         raise OSError("no file with expected extension")
    158 
    159     ctypes_load_library = deprecate(load_library, 'ctypes_load_library',

OSError: no file with expected extension
@guillermo-navas-palencia
Copy link
Owner

Hi, unfortunately, I have not tested CPrior on macOS since initially only supported Linux and Windows OS. However, in _lib/cprior.py it is possible to add a check to macOS "darwin" platform. Did you compile a shared library for macOS? does it have .so or .dylib extension? Any help with other OS is welcome.

@guillermo-navas-palencia
Copy link
Owner

Hi,
Files setup.py and _lib/cprior.py to read the shared library have been updated to fix this issue. You just need to create a cprior.dylib shared library and save it in _lib/. Let me know if that worked for you.

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

2 participants