Please give me a solution to the error of importing the Jupiter lab tensorflow module.

Asked 2 years ago, Updated 2 years ago, 142 views

Originally, I used Python as a jupyter notebook, but I recently found out about the jupyter lab and installed it. If you import tensorflow while using the jupyter lab,

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-d8706ff7de9a> in <module>
      8 from tqdm import tqdm_notebook # Tqdm for measuring the time about processing loop
      9 import time # Time for measuring the time about processing loop
---> 10 import tensorflow as tf # Tensorflow for modeling the RNN
     11 import random # Random for sampling data
     12 from tensorflow.keras.preprocessing.sequence import pad_sequences # For pre-processing data

ModuleNotFoundError: No module named 'tensorflow'

The following error appears: It's an error that didn't happen when I used the jupyter notebook So even if you install a new tensorflow, it's already downloaded When I first turned on the jupyter notebook or the jupyter lab, After activate venv, set the folder and turn it on, but it's always the same Is there a reason why it's not possible only in the jupyter lab?

jupyter

2022-09-20 22:08

1 Answers

In a notebook and lab environment

import sys
sys.path

Compare that. You can see which environment it is running in which environment it is running in. If it's the same execution environment, the path would be the same, but it's probably different if it can't be imported.


2022-09-20 22:08

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.