I´m trying to install the lib psutil, using the command !pip install psutil. When I run this code, I got this
Requirement already satisfied: psutil in /opt/conda/lib/python3.6/site-packages (5.4.8)
After that, I try to run this code:
from plotly.offline import iplot, init_notebook_mode
import plotly.graph_objs as go
import plotly.io as pio
import os
import numpy as np
init_notebook_mode(connected=True)
N = 100
x = np.random.rand(N)
y = np.random.rand(N)
colors = np.random.rand(N)
sz = np.random.rand(N)*30
fig = go.Figure()
fig.add_scatter(x=x,
y=y,
mode='markers',
marker={'size': sz,
'color': colors,
'opacity': 0.6,
'colorscale': 'Viridis'
});
iplot(fig)
pio.write_image(fig, 'fig1.png')
And it works! But at the end of the code, when I try to save the picture, I got this error:
ValueError: Image generation requires the psutil package.
Install using pip:
$ pip install psutil
Install using conda:
$ conda install psutil
What can I do to install the lib psutil?
I also try to install using conda install psutil and got this:
==> WARNING: A newer version of conda exists. <==
current version: 4.5.8
latest version: 4.5.11
Please update conda by running
$ conda update -n base conda
# All requested packages already installed.
But if I use conda update -n base conda, nothing happend!