Skip to content

reticulate crashes R session in RStudio 1.4 preview (1.4.953) #8189

Open

Description

@dkincaid

System details

RStudio Edition : Desktop
RStudio Version : 1.4.953
OS Version      : PopOS 20.10
R Version       : 4.0.2

Steps to reproduce the problem

Run reticulate::py_config()

Describe the problem in detail

Inside of RStudio when running reticulate::py_config() the R session crashes. When the same command is run inside of R from the command line, no crash happens and the expected information is displayed.

image

diagnostics-report.txt

Describe the behavior you expected

RStudio R session shouldn't crash.

  • I have read the guide for submitting good bug reports.
  • I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • If I am reporting a RStudio crash, I have included a diagnostics report.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

Activity

  1. kevinushey commented on Oct 26, 2020

    @kevinushey
    Collaborator

    What are the results of reticulate::py_config() when running R in a terminal (outside of RStudio)?

  2. dkincaid commented on Oct 26, 2020

    @dkincaid
    Author

    Here is the result from R running outside of RStudio:

    ➜  ~ R
    
    R version 4.0.2 (2020-06-22) -- "Taking Off Again"
    Copyright (C) 2020 The R Foundation for Statistical Computing
    Platform: x86_64-pc-linux-gnu (64-bit)
    
    R is free software and comes with ABSOLUTELY NO WARRANTY.
    You are welcome to redistribute it under certain conditions.
    Type 'license()' or 'licence()' for distribution details.
    
      Natural language support but running in an English locale
    
    R is a collaborative project with many contributors.
    Type 'contributors()' for more information and
    'citation()' on how to cite R or R packages in publications.
    
    Type 'demo()' for some demos, 'help()' for on-line help, or
    'help.start()' for an HTML browser interface to help.
    Type 'q()' to quit R.
    
    > reticulate::py_config()
    python:         /home/davek/anaconda3/bin/python3
    libpython:      /home/davek/anaconda3/lib/libpython3.7m.so
    pythonhome:     /home/davek/anaconda3:/home/davek/anaconda3
    version:        3.7.6 (default, Jan  8 2020, 19:59:22)  [GCC 7.3.0]
    numpy:          /home/davek/anaconda3/lib/python3.7/site-packages/numpy
    numpy_version:  1.18.1
    
    python versions found: 
     /home/davek/anaconda3/bin/python3
     /usr/bin/python3
     /usr/bin/python
     /home/davek/anaconda3/bin/python
     /home/davek/anaconda3/envs/fill_mask_env/bin/python
     /home/davek/miniconda3/bin/python
    
  3. kevinushey commented on Oct 26, 2020

    @kevinushey
    Collaborator

    Do you have better luck in RStudio with:

    Sys.setenv("RETICULATE_PYTHON" = "/usr/bin/python3")
    reticulate::py_config()
    

    Seems like RStudio might be having trouble binding to your Anaconda Python installation.

  4. dkincaid commented on Oct 26, 2020

    @dkincaid
    Author

    Yes, that does work inside of RStudio:

    > reticulate::py_config()
    python:         /usr/bin/python3
    libpython:      /usr/lib/python3.8/config-3.8-x86_64-linux-gnu/libpython3.8.so
    pythonhome:     //usr://usr
    version:        3.8.6 (default, Sep 25 2020, 09:36:53)  [GCC 10.2.0]
    numpy:          /usr/lib/python3/dist-packages/numpy
    numpy_version:  1.18.4
    
    NOTE: Python version was forced by RETICULATE_PYTHON
    Warning messages:
    1: Python '/home/davek/anaconda3/bin/python' was requested but '/usr/bin/python3' was loaded instead (see reticulate::py_config() for more information) 
    2: Python '/home/davek/anaconda3/bin/python' was requested but '/usr/bin/python3' was loaded instead (see reticulate::py_config() for more information)
    
  5. added this to the Later milestone on Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions