Last active
April 28, 2019 17:37
-
-
Save aswan89/aaed766b0723a32b956f408e6b7426c0 to your computer and use it in GitHub Desktop.
reticulate segfault and accompanying detective work
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> library(reticulate) | |
> py_config() | |
*** caught segfault *** | |
address 0x8, cause 'memory not mapped' | |
Traceback: | |
1: py_run_string_impl(paste0("import sys; sys.path.append('", system.file("python", package = "reticulate"), "')")) | |
2: initialize_python(required_module, use_environment) | |
3: ensure_python_initialized() | |
4: py_config() | |
> Sys.which('python') | |
python | |
"/nix/store/m2br92794yw09hjwh3vzadbphckagmzv-python3-3.7.3-env/bin/python" | |
> system.file("python", package="reticulate") | |
[1] "/nix/store/v64aywkbbr4qj92xv19fxmhdv66icl3q-r-reticulate-1.10/library/reticulate/python" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, ...}: | |
with pkgs; | |
let myPackages = | |
with rPackages; | |
[ | |
reticulate | |
keras | |
tensorflow | |
]; | |
in | |
let | |
myR = rWrapper.override | |
{ | |
packages = myPackages; | |
}; | |
in { | |
environment.systemPackages = [ myR ]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with import <nixpkgs> {}; | |
(python3.withPackages (ps: | |
[ | |
ps.Keras | |
ps.tensorflow | |
] | |
) | |
).env |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment