0
votes

I installed jupyter notebook and tensorflow on server, and use Anacondas to create environment. After source activate 'my-conda-python3', and enter python, 'import tensorflow' worked.

I want to remotely access notebook from client. I did:

1) From client PC terminal, SSH into server, source activate 'my-conda-python3', start notebook server (Jupyter and tensorflow are installed under conda environment):

jupyter notebook --no-browser --port=8889

Copy key from terminal.

BTW, if not using source activate 'my-conda-python3', enter python and 'import tensorflow' also work.

2) From client PC terminal,

ssh -N -f -L localhost:8888:localhost:8889 @

3) In client browser:

localhost:8888 and then paste key,

Browse is able to access notebook server. But 'import tensorflow' has error:


ModuleNotFoundError Traceback (most recent call last) in () ----> 1 import tensorflow

ModuleNotFoundError: No module named 'tensorflow'

What I am missing?

1
Sounds like the notebook is not using your conda environment. - user3813674
That's what I am thinking, Which step 1) or 2) has problem? Even not my conda environment is able 'import tensorflow' successfully on server. So, may be something else is missing. - user6101147

1 Answers

0
votes

From PC terminal, SSH into server

source activate 'my-conda-python3'
source activate tensorflow
(tensorflow) jupyter notebook

This will work.