-2

I use a MacBook pro-2015, and I use the monetary. I was able to pip install tensorflow to a new conda environment, but after it, pandas and matplotlib was no longer found.

import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
import pandas as pd

Below is the traceback of error:

ModuleNotFoundError                       Traceback (most recent call last)
Cell In[1], line 2
      1 import numpy as np
----> 2 import matplotlib.pyplot as plt
      3 import tensorflow as tf
      4 import pandas as pd

ModuleNotFoundError: No module named 'matplotlib'
Mario
  • 1,631
  • 2
  • 21
  • 51
  • install matplotlib in that environment? – warped Feb 08 '23 at 22:17
  • Does this answer your question? [anaconda cannot import matplotlib.pyplot](https://stackoverflow.com/questions/43501102/anaconda-cannot-import-matplotlib-pyplot) – Mario Feb 09 '23 at 11:40

1 Answers1

0

I have been able to solve this problem

I created a conda environment "myenv" where I installed tensorflow

Then I activated the conda environment in my terminal using

conda activate myenv

Then I installed the packages/libraries that I need

conda install pandas
conda install matplotlib

Just use this method to install any package into any environment you are working on