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 #2

Closed
reActionHank opened this issue Apr 20, 2019 · 7 comments
Closed

Unable to install #2

reActionHank opened this issue Apr 20, 2019 · 7 comments

Comments

@reActionHank
Copy link

tried installing it on 2 separate machines, but I get the same error:

Error in install_keras(method = method, conda = conda, version = keras, : You should call install_keras() only in a fresh R session that has not yet initialized Keras and TensorFlow (this is to avoid DLL in use errors during installation)

Tried a couple of different things, creating new anaconda environments, reinstalling python, installing miniconda, etc.

I can install the keras and tensorflow packages separately w/o much problems, just the autokeras is an issue.

If you have any idea what to do would appreaciate it.

@jcrodriguez1989
Copy link
Member

Hi @reActionHank , thanks for your feedback.
I am trying to reproduce your issue, so far, I am guessing you are using Windows.
So, in my Windows 10 VM I am not being able to even install keras.
Have you tried starting an R session and doing

remotes::install_github("rstudio/keras")
library("keras")
install_keras()

Is this working for you?

thanks

@reActionHank
Copy link
Author

reActionHank commented Apr 21, 2019 via email

@jcrodriguez1989
Copy link
Member

@reActionHank I am not being able to reproduce your issue since I am not a Windows user, and my VM needs a lot of libraries installation.
Your Error in install_keras(method = method, ... error is not an autokeras code error. If you can reproduce it by creating a new empty env and try install_keras() then you might post it as a keras issue, this would be helpful for both autokeras and keras R libraries :) .
However, as a workaround for autokeras, you could manually install the Python Auto-Keras library.
You could try activating your keras working environment (remember it must have Python 3.6) and do from prompt:

conda install pytorch torchvision -c pytorch
pip install autokeras

@jcrodriguez1989
Copy link
Member

@reActionHank I think what you noticed, might be an issue. Could you please reinstall autokeras remotes::install_github("jcrodriguez1989/autokeras") and re try doing install_autokeras()?
thanks!

In install_autokeras() was using reticulate::py_config() to get current Python version, and using this function initializes Python, and thus when keras::install_keras() calls reticulate::py_available() it returns TRUE and then the error you noted

> reticulate::py_available()
[1] FALSE
> reticulate::py_config()$version
[1] "3.6"
> reticulate::py_available()
[1] TRUE

@reActionHank
Copy link
Author

reActionHank commented Apr 25, 2019 via email

@jcrodriguez1989
Copy link
Member

thanks!
So, the bug is over. Now it is working at it should, and it is saying that the conda env is going to use Python 3.7, which is not supported by autokeras. And there it appears the new issue you are having.
I have been checking this, and Python 3.7 is being used because tensorflow R library uses this Python version if using default tensorflow version (1.3).
However, if you specify tensorflow 1.2. It will have other problems related to pytorch and etc.
To summarise, I would recommend you installing Python autokeras manually in your conda env.

@loheden
Copy link

loheden commented May 9, 2021

@jcrodriguez1989 , how do you install autokeras manually from source? I am not able to install it on MAC OS M1.

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

3 participants