amstelchen / GameInfo

System info tool for gamers
GNU General Public License v2.0
1 stars 0 forks source link

ImportError: cannot import name '_psutil_linux' from partially initialized module 'psutil' #3

Open amstelchen opened 2 years ago

amstelchen commented 2 years ago

Problem:

$ GameInfo
[...]
  File "/home/mic/.local/lib/python3.9/site-packages/pytest_cloud/plugin.py", line 198, in get_node_capabilities
  File "/home/mic/.local/lib/python3.9/site-packages/psutil/__init__.py", line 99, in <module>
    from . import _pslinux as _psplatform
  File "/home/mic/.local/lib/python3.9/site-packages/psutil/_pslinux.py", line 26, in <module>
    from . import _psutil_linux as cext
ImportError: cannot import name '_psutil_linux' from partially initialized module 'psutil' 
(most likely due to a circular import) (/home/mic/.local/lib/python3.9/site-packages/psutil/__init__.py)

Solution:

$ pip install psutil py7zr
[...]
$ pip show psutil py7zr
Name: psutil
Version: 5.9.1
Summary: Cross-platform lib for process and system monitoring in Python.
Home-page: https://github.com/giampaolo/psutil
Author: Giampaolo Rodola
Author-email: g.rodola@gmail.com
License: BSD
Location: /home/mic/.local/lib/python3.9/site-packages
Requires: 
Required-by: py7zr
---
Name: py7zr
Version: 0.20.0
Summary: Pure python 7-zip library
Home-page: https://github.com/miurahr/py7zr
Author: Hiroshi Miura
Author-email: Hiroshi Miura <miurahr@linux.com>
License: LGPL-2.1-or-later
Location: /home/mic/.local/lib/python3.9/site-packages
Requires: brotli, inflate64, multivolumefile, psutil, pybcj, pycryptodomex, pyppmd, pyzstd, texttable
Required-by: 
amstelchen commented 2 years ago

Explanation here: https://stackoverflow.com/questions/50671671/apache-airflow-importerror-cannot-import-name-psutil-linux