facebookresearch / hanabi_SAD

Simplified Action Decoder for Deep Multi-Agent Reinforcement Learning
Other
96 stars 35 forks source link

ImportError: cannot import name 'PCA' from 'matplotlib.mlab' (/usr/local/lib/python3.7/dist-packages/matplotlib/mlab.py) #29

Closed fangbq closed 3 years ago

fangbq commented 3 years ago

I ran the code of the first cell in this colab link https://colab.research.google.com/drive/1Cvs4GuFvHEdvb7tVJQVvQOviAkRf97r7#scrollTo=-qEdS9Ktc8Z6&line=10&uniqifier=1 for matrix game, then got an import error:

Requirement already satisfied: dm-sonnet in /usr/local/lib/python3.7/dist-packages (2.0.0)
Requirement already satisfied: wrapt>=1.11.1 in /usr/local/lib/python3.7/dist-packages (from dm-sonnet) (1.12.1)
Requirement already satisfied: six>=1.12.0 in /usr/local/lib/python3.7/dist-packages (from dm-sonnet) (1.15.0)
Requirement already satisfied: dm-tree>=0.1.1 in /usr/local/lib/python3.7/dist-packages (from dm-sonnet) (0.1.6)
Requirement already satisfied: numpy>=1.16.3 in /usr/local/lib/python3.7/dist-packages (from dm-sonnet) (1.19.5)
Requirement already satisfied: tabulate>=0.7.5 in /usr/local/lib/python3.7/dist-packages (from dm-sonnet) (0.8.9)
Requirement already satisfied: absl-py>=0.7.1 in /usr/local/lib/python3.7/dist-packages (from dm-sonnet) (0.12.0)
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-4-70fb97d61ded> in <module>()
      8 from google.colab import files
      9 
---> 10 from matplotlib.mlab import PCA
     11 
     12 def repeat_tensor(tensor, repetion):

ImportError: cannot import name 'PCA' from 'matplotlib.mlab' (/usr/local/lib/python3.7/dist-packages/matplotlib/mlab.py)

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------