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 on colabr-package.ipynb example #1

Closed
jrosell opened this issue Mar 24, 2022 · 2 comments
Closed

Error on colabr-package.ipynb example #1

jrosell opened this issue Mar 24, 2022 · 2 comments

Comments

@jrosell
Copy link

jrosell commented Mar 24, 2022

I tried the colabr-package.ipynb example and I get the following error when running setup_spacyr()

Using existing conda environment  r-reticulate  for spaCy installation
. 
spaCy and language model(s): en_core_web_sm will be installed.  Installing spaCy...

Installing model "en_core_web_sm"

Language model "en_core_web_sm" is successfully installed

Installation complete.
Condaenv: r-reticulate; Language model(s): en_core_web_sm

Error in py_run_file_impl(file, local, convert): RuntimeError: The current Numpy installation ('/usr/local/envs/r-reticulate/lib/python3.8/site-packages/numpy/__init__.py') fails to pass simple sanity checks. This can be caused for example by incorrect BLAS library being linked in, or by mixing package managers (pip, conda, apt, ...). Search closed numpy issues for similar problems.

Detailed traceback:
  File "<string>", line 9, in <module>
  File "/usr/local/lib/R/site-library/reticulate/python/rpytools/loader.py", line 39, in _import_hook
    module = _import(
  File "/usr/local/envs/r-reticulate/lib/python3.8/site-packages/spacy/__init__.py", line 11, in <module>
    from thinc.api import prefer_gpu, require_gpu, require_cpu  # noqa: F401
  File "/usr/local/lib/R/site-library/reticulate/python/rpytools/loader.py", line 39, in _import_hook
    module = _import(
  File "/usr/local/envs/r-reticulate/lib/python3.8/site-packages/thinc/__init__.py", line 2, in <module>
    import numpy
  File "/usr/local/lib/R/site-library/reticulate/python/rpytools/loader.py", line 39, in _import_hook
    module = _import(
  File "/usr/local/envs/r-reticulate/lib/python3.8/site-packages/numpy/__init__.py", line 349, in <module>
    _sanity_check()
  File "/usr/local/envs/r-reticulate/lib/python3.8/site-packages/numpy/__init__.py", line 347, in _sanity_check
    raise RuntimeError(msg.format(__file__)) from None

Traceback:

1. setup_spacyr()

2. spacy_initialize(condaenv = env, model = lang_models, python_executable = path)

3. spacyr_pyexec(pyfile = system.file("python", "spacyr_class.py", 
 .     package = "spacyr"))

4. reticulate::py_run_file(pyfile)

5. py_run_file_impl(file, local, convert)
@jrosell jrosell closed this as completed Mar 24, 2022
@jrosell
Copy link
Author

jrosell commented Mar 24, 2022

Sorry, restarting the runtime again make it work.

@hansquiogue
Copy link
Owner

@jrosell No worries, glad you were able to fix your issue! Just a heads up, I usually don't have too much time nowadays to maintain this, but if you run into other problems feel free to open another issue and I'll be sure to look into it whenever I have the time.

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