cannot import name '_psutil_linux'
See original GitHub issueThe output of thefuck --version (something like The Fuck 3.1 using Python 3.5.0):
thefuck --version
Traceback (most recent call last): File “/usr/local/bin/thefuck”, line 7, in <module> from thefuck.entrypoints.main import main File “/usr/local/lib/python3.5/dist-packages/thefuck/entrypoints/main.py”, line 11, in <module> from .alias import print_alias # noqa: E402 File “/usr/local/lib/python3.5/dist-packages/thefuck/entrypoints/alias.py”, line 3, in <module> from …shells import shell File “/usr/local/lib/python3.5/dist-packages/thefuck/shells/init.py”, line 6, in <module> from psutil import Process File “/usr/lib/python2.7/dist-packages/psutil/init.py”, line 68, in <module> from . import _pslinux as _psplatform File “/usr/lib/python2.7/dist-packages/psutil/_pslinux.py”, line 24, in <module> from . import _psutil_linux as cext ImportError: cannot import name ‘_psutil_linux’
Your shell and its version (bash, zsh, Windows PowerShell, etc.):
bash --version GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu) Copyright © 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Your system (Debian 7, ArchLinux, Windows, etc.):
Ubuntu 16.04 LTS
How to reproduce the bug:
typing 'fuck' or 'thefuck --version'. In short, it always gives me the same traceback of the name import error
The output of The Fuck with THEFUCK_DEBUG=true exported (typically execute export THEFUCK_DEBUG=true in your shell before The Fuck):
IDK, whatever command I use with "thefuck" included, same beforementioned issue
If the bug only appears with a specific application, the output of that application and its version:
N/A
Anything else you think is relevant:
which -a python /home/antoniodn/anaconda2/bin/python /home/antoniodn/anaconda2/bin/python /usr/bin/python
which -a python3 /usr/bin/python3
which -a pip /home/antoniodn/anaconda2/bin/pip /home/antoniodn/anaconda2/bin/pip /usr/local/bin/pip /usr/bin/pip
which -a pip3 /usr/local/bin/pip3 /usr/bin/pip3
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:9 (1 by maintainers)
Top Related StackOverflow Question
I had now the same issue, I needed to reinstall the psutil and decorator packages…
And now it seems it works…
Just pip install psutil==5.7.0 works for me