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

Unable to install keras/tf after R update on MacOS 10.14 #918

Closed
matthiasmace opened this issue Nov 7, 2019 · 2 comments
Closed

Unable to install keras/tf after R update on MacOS 10.14 #918

matthiasmace opened this issue Nov 7, 2019 · 2 comments

Comments

@matthiasmace
Copy link

matthiasmace commented Nov 7, 2019

Hi,
After running perfectly TF 1.1/Keras, I tried to update.
I am now unable to install Keras.

>devtools::install_github("rstudio/keras")
> library(keras)
> install_keras()
Using virtual environment '/Users/matthias/.virtualenvs/r-reticulate' ...
Traceback (most recent call last):
  File "/Users/matthias/.virtualenvs/r-reticulate/bin/pip", line 6, in <module>
    from pip._internal.main import main
ModuleNotFoundError: No module named 'pip._internal.main'
Error in strsplit(output, "\\s+")[[1]] : indice hors limites
De plus : Warning message:
In system2(pip, "--version", stdout = TRUE) :
  l'ex'ecution de la commande ''/Users/matthias/.virtualenvs/r-reticulate/bin/pip' --version' renvoie un statut 1```
@MLExporer
Copy link

I am having the same problem. Keras / TF was working, but I needed to get an update to get some new features. I'm running MacOS 10.15.1, and I got the following. I hope someone fixes this.

devtools::install_github("rstudio/tensorflow")
Downloading GitHub repo rstudio/tensorflow@master
These packages have more recent versions available.
Which would you like to update?

1: All
2: CRAN packages only
3: None
4: jsonlite (1.5 -> 1.6 ) [CRAN]
5: reticulate (1.10 -> 1.14 ) [CRAN]
6: rstudioapi (0.7 -> 0.10 ) [CRAN]
7: R6 (2.2.2 -> 2.4.1) [CRAN]
8: Rcpp (1.0.0 -> 1.0.3) [CRAN]
9: whisker (0.3-2 -> 0.4 ) [CRAN]
10: glue (1.3.0 -> 1.3.1) [CRAN]

Enter one or more numbers, or an empty line to skip updates:

Installing 1 packages: rappdirs
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/rappdirs_0.3.1.tgz'
Content type 'application/x-gzip' length 93143 bytes (90 KB)

downloaded 90 KB

The downloaded binary packages are in
/var/folders/14/sgy3vtdd2n7dq7dkggllg24h0000gn/T//RtmpyL9oAi/downloaded_packages
✓ checking for file ‘/private/var/folders/14/sgy3vtdd2n7dq7dkggllg24h0000gn/T/RtmpyL9oAi/remotesfa7b61474a9e/rstudio-tensorflow-f2ba22d/DESCRIPTION’ ...
─ preparing ‘tensorflow’:
✓ checking DESCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘tensorflow_2.0.0.tar.gz’

  • installing source package ‘tensorflow’ ...
    ** R
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded
  • DONE (tensorflow)

library(reticulate)
virtualenv_remove("r-tensorflow")
Remove virtualenv at ~/.virtualenvs/r-tensorflow? [Y/n]:
library(keras)
install_keras()
Error in virtualenv_install(envname, packages, ...) :
unused arguments (python_version = conda_python_version, pip = TRUE, pip_ignore_installed = FALSE)

@t-kalinowski
Copy link
Member

Hello,

The code that installs tensorflow and keras has been refactored.
Please update to the latest versions of reticulate, tensorflow, and keras:

install.packages("remotes")
remotes::install_github(paste0("rstudio/", c("reticulate", "tensorflow", "keras")))
reticulate::install_miniconda() # skip this if you want to self-install conda or use venv
keras::install_keras()

Please let us know if after updating you are still encountering installation issues:
https://github.com/rstudio/tensorflow/issues/new

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants