Closed StefanKarlsson987 closed 5 years ago
Let me know if my latest push resolves this. It worked for me, and should support all of the class modules.
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
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
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.
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!
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?