0

I can't access tensorflow or pytorch from Jupyter notebook or lab. My OS is macOS big sur . I installed python@3.8 using homebrew. If I try to run this:

import tensorflow as tf

import numpy as np

import matplotlib.pyplot as plt

print(tf.__version__)

simple code on Jupyter notebook , it is showing this output:

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-3c075791d0d7> in <module>
      1 # TensorFlow and tf.keras
----> 2 import tensorflow as tf
      3 
      4 # Helper libraries
      5 import numpy as np

ModuleNotFoundError: No module named 'tensorflow'

I created separate virtual environment and install tensorflow on it. But I installed jupyter notebook & lab outside virtual environment. Is there anyway to access tensorflow & pytorch from jupyter notebook or lab without using Anaconda?

MD MAHBUB ALAM
  • 57
  • 2
  • 3
  • 9
  • You need to install `jupyter` in the virtual environment. – Lescurel Dec 15 '20 at 11:04
  • @Lescurel sorry brother it is not working at all . Still facing the same problem "ModuleNotFoundError" – MD MAHBUB ALAM Dec 15 '20 at 17:40
  • You need to install kernel for jupyter notebook and select the specific kernel before running anything. Follow this post then it should work https://stackoverflow.com/questions/33496350/ –  Dec 24 '20 at 08:18

0 Answers0