Problem installing matplotlib using conda and virtual environment. ModuleNotFoundError

Question:

I have tried to install matplotlib in my environment "cs323V2"with the following commands:

(cs323V2) conda install matplotlib
Collecting package metadata (current_repodata.json): done
Solving environment: done

# All requested packages already installed.

Retrieving notices: ...working... done
(cs323V2) python
Python 2.7.5 (default, Nov 16 2020, 22:23:17) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
[3]+  Stopped                 python
>>> import matplotlib
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'matplotlib'
Asked By: JuanMuñoz

||

Answers:

Use the conda-forge channel.

conda install -c conda-forge matplotlib

I am not really sure why only

conda install matplotlib 

does not work.

Answered By: JuanMuñoz