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 while installing "keras-rl2" #28

Closed
StefanKarlsson987 opened this issue Jul 21, 2019 · 5 comments
Closed

error while installing "keras-rl2" #28

StefanKarlsson987 opened this issue Jul 21, 2019 · 5 comments
Labels

Comments

@StefanKarlsson987
Copy link

Following error results from executing the list of pip install dependencies:

ERROR: tensorflow 2.0.0b1 has requirement tb-nightly<1.14.0a20190604,>=1.14.0a20190603, but you'll have tb-nightly 1.15.0a20190720 which is incompatible.

installing instead "keras-2.2.4", which was the case of previous committ, solves the error. However, will that break things later in the tutorial?

@jeffheaton
Copy link
Owner

Let me know if my latest push resolves this. It worked for me, and should support all of the class modules.

@jeffheaton jeffheaton added the bug label Jul 22, 2019
@StefanKarlsson987
Copy link
Author

StefanKarlsson987 commented Jul 22, 2019

Thanks for the good work.

I attempted to modify my "tensorflow" environment in Anaconda by uninstalling my keras 2.2.4, and the previous tensorflow version (2.0 beta), and then installing the new packages. I dont know if this is the way its supposed to be done, but here is what i did in the anaconda prompt:

pip uninstall tensorflow
pip uninstall keras
pip install --exists-action i --upgrade tf-nightly-2.0-preview
pip install --exists-action i --upgrade keras-rl2

This executed without error.

after this, I tried one of the notebooks that imported tensorflow. Executing the line
import tensorflow
yields the error "no module named tensorflow"

previously, tensorflow was imported correctly, and I could run the notebooks

@jeffheaton
Copy link
Owner

This will be fun until TensorFlow 2.0 is official and everything has stabilized to that. I updated the install instructions a bit, I tried several installs from scratch and I believe this is the best set of instructions that gets both TF/Keras 2.0 and Keras Reinforcement working together. I also tested successfully on Mac/Windows.

Below is the complete script that I've run several times. I would suggest installing from a new environment.

Note that my env is named wustl2. Also the second line changes to "activate wustl2" if on Windows. I tried in both. GitHub is also up to date for this. Let me know if this helps any.

conda create -y --name wustl2 python=3.6
source activate wustl2
conda install -y jupyter
conda install -y scipy
pip install --exists-action i --upgrade sklearn
pip install --exists-action i --upgrade pandas
pip install --exists-action i --upgrade pandas-datareader
pip install --exists-action i --upgrade matplotlib
pip install --exists-action i --upgrade pillow
pip install --exists-action i --upgrade tqdm
pip install --exists-action i --upgrade requests
pip install --exists-action i --upgrade h5py
pip install --exists-action i --upgrade pyyaml
pip install --exists-action i --upgrade tensorflow_hub
pip install --exists-action i --upgrade bayesian-optimization
pip install --exists-action i --upgrade spacy
pip install --exists-action i --upgrade gensim
pip install --exists-action i --upgrade flask
pip install --exists-action i --upgrade gym
pip install --exists-action i --upgrade tf-nightly-2.0-preview
pip install --exists-action i --upgrade keras-rl2 --user
python -m ipykernel install --user --name wustl2 --display-name "Python 3.6 (wustl2)"
conda update -y --all

@StefanKarlsson987
Copy link
Author

It works as advertised.... today that is, lets see about tomorrow.

You are doing absolutely awesome work. Its a pleasure to read and learn from.

@jeffheaton
Copy link
Owner

You are most welcome! Let me know if you run into anything else. I just need to code 2 more modules for the class and then I plan to completely rerun and retest everything in a few weeks just before class starts. It would be really nice if Google could release TF 2.0 prior to Aug 26 before I start the class, but we will see!

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

No branches or pull requests

2 participants