Title: ModuleNotFoundError: No module named 'psutil' · Issue #4867 · plotly/plotly.py · GitHub
Open Graph Title: ModuleNotFoundError: No module named 'psutil' · Issue #4867 · plotly/plotly.py
X Title: ModuleNotFoundError: No module named 'psutil' · Issue #4867 · plotly/plotly.py
Description: Encountered this error today when calling fig.show() in a fresh Python environment: ModuleNotFoundError: No module named 'psutil' Stack trace: (local) (plotly.py) (base) ekl@Emilys-MacBook-Air-2 plotly.py % python test-histogram.py Trace...
Open Graph Description: Encountered this error today when calling fig.show() in a fresh Python environment: ModuleNotFoundError: No module named 'psutil' Stack trace: (local) (plotly.py) (base) ekl@Emilys-MacBook-Air-2 pl...
X Description: Encountered this error today when calling fig.show() in a fresh Python environment: ModuleNotFoundError: No module named 'psutil' Stack trace: (local) (plotly.py) (base) ekl@Emilys-MacBook-...
Opengraph URL: https://github.com/plotly/plotly.py/issues/4867
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ModuleNotFoundError: No module named 'psutil'","articleBody":"Encountered this error today when calling `fig.show()` in a fresh Python environment:\n\n```\nModuleNotFoundError: No module named 'psutil'\n```\n\nStack trace:\n```\n(local) (plotly.py) (base) ekl@Emilys-MacBook-Air-2 plotly.py % python test-histogram.py\nTraceback (most recent call last):\n File \"/Users/ekl/code/plotly.py/test-histogram.py\", line 17, in \u003cmodule>\n fig.show()\n File \"/Users/ekl/code/plotly.py/packages/python/plotly/plotly/basedatatypes.py\", line 3414, in show\n return pio.show(self, *args, **kwargs)\n ^^^^^^^^\n File \"/Users/ekl/code/plotly.py/packages/python/plotly/_plotly_utils/importers.py\", line 36, in __getattr__\n class_module = importlib.import_module(rel_module, parent_name)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/__init__.py\", line 90, in import_module\n return _bootstrap._gcd_import(name[level:], package, level)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"\u003cfrozen importlib._bootstrap>\", line 1387, in _gcd_import\n File \"\u003cfrozen importlib._bootstrap>\", line 1360, in _find_and_load\n File \"\u003cfrozen importlib._bootstrap>\", line 1331, in _find_and_load_unlocked\n File \"\u003cfrozen importlib._bootstrap>\", line 935, in _load_unlocked\n File \"\u003cfrozen importlib._bootstrap_external>\", line 995, in exec_module\n File \"\u003cfrozen importlib._bootstrap>\", line 488, in _call_with_frames_removed\n File \"/Users/ekl/code/plotly.py/packages/python/plotly/plotly/io/_renderers.py\", line 38, in \u003cmodule>\n import psutil\nModuleNotFoundError: No module named 'psutil'\n```\n\n---\n\nThis is caused by the addition of `import psutil` at the top of `plotly/io/_renderers.py` in #4823.\n\nI think all that needs to change is to move `import psutil` inside `display_jupyter_version_warnings()` under the two Jupyter `elif` cases (so that it doesn't get encountered when calling the normal `fig.show()` from a regular Python script).","author":{"url":"https://github.com/emilykl","@type":"Person","name":"emilykl"},"datePublished":"2024-11-12T22:06:46Z","url":"https://github.com/plotly/plotly.py/issues/4867"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e79e20c0-0a51-3d8a-3182-f2215c3a2c5d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D4E8:16AB79:164CD6E:1C6014C:6B0135F9 |
| html-safe-nonce | 175529cca50320570d16a1441674c45d0a1255c8a6fa9644082a69de302670a0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENEU4OjE2QUI3OToxNjRDRDZFOjFDNjAxNEM6NkIwMTM1RjkiLCJ2aXNpdG9yX2lkIjoiMjk0NzUyNDk1NDgyNjAyODUzNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c600248c553978134fce0e29bcb82067336a8b469055a54539bfa27f1ac52dca |
| hovercard-subject-tag | issue:2653447439 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/plotly/plotly.py/4867/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7174aafbd79935691ef2c3401eeea7dea0581734315d3b605d04bd142ea88e2f/plotly/plotly.py/issues/4867 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7174aafbd79935691ef2c3401eeea7dea0581734315d3b605d04bd142ea88e2f/plotly/plotly.py/issues/4867 |
| og:image:alt | Encountered this error today when calling fig.show() in a fresh Python environment: ModuleNotFoundError: No module named 'psutil' Stack trace: (local) (plotly.py) (base) ekl@Emilys-MacBook-Air-2 pl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | emilykl |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/plotly/plotly.py git https://github.com/plotly/plotly.py.git |
| octolytics-dimension-user_id | 5997976 |
| octolytics-dimension-user_login | plotly |
| octolytics-dimension-repository_id | 14579099 |
| octolytics-dimension-repository_nwo | plotly/plotly.py |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14579099 |
| octolytics-dimension-repository_network_root_nwo | plotly/plotly.py |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width