We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d99b35 commit a3ecf91Copy full SHA for a3ecf91
packages/python/plotly/plotly/io/_renderers.py
@@ -35,13 +35,14 @@
35
from plotly import optional_imports
36
37
import warnings
38
-import psutil
39
40
41
def display_jupyter_version_warnings():
42
parent_process = None
43
try:
44
- parent_process = psutil.Process().parent().cmdline()[-1]
+ psutil = optional_imports.get_module("psutil")
+ if psutil is not None:
45
+ parent_process = psutil.Process().parent().cmdline()[-1]
46
except Exception:
47
pass
48
0 commit comments