0

I'm following the flow/tutorials/README.md to set up the tutorial environment, but I still have some errors.

When I open the jupyter notebook interface, there are five environments in the 'kernel': python2, python[conda env:enter], python[conda env:flow], python[conda root], python[default]. These kernels I have tried, but I still get an error.

(The "enter" in python env [conda env:enter] is my own downloaded anaconda.)

from flow.scenarios.loop import LoopScenario

ImportError Traceback (most recent call last) in () ----> 1 from flow.scenarios.loop import LoopScenario

ImportError: No module named 'flow'```

SherylHohman
  • 16,580
  • 17
  • 88
  • 94
jing
  • 11
  • I can successfully import tensorflow in jupyter notebook,but i don't know why "Flow" can't. – jing Jul 12 '19 at 03:18
  • BTW:I am running in the case of the "Python[conda env:flow]", show "ImportError: No module named flow" – jing Jul 12 '19 at 03:23

1 Answers1

1

Open a new terminal and run the following:

cd /
source activate flow
python

(cd / is to make sure flow is not in the folder you run python from)

Then in the Python interface that opens, run import flow.

Do you get an error when trying to import?

math.husky
  • 193
  • 1
  • 8
  • Yes! i have an ImportError: No module named flow. when I input "python", the terminal show "python 3.5.2", But I remember that the python version of the anaconda I installed is 3.6.5. Is this the reason? – jing Jul 12 '19 at 06:16
  • This means that you don't have flow installed within the current anaconda environment. You can try to run the same commands but replace `python` by `python3.6` and see if you get the import error. Otherwise, redo the part of the installation instructions where you have to `pip install -e flow` (something like that) to add flow to the environment (after having done source activate flow!). – math.husky Jul 12 '19 at 08:02
  • `pip install -e .` actually, in the folder that contains the `setup.py` file. – math.husky Jul 12 '19 at 08:07
  • Okay, according to what you said, I have reconfigured the environment. Now I can run it in the jupyter notebook.Thank you for your answer. – jing Jul 12 '19 at 11:46